@bolt-foundry/gambit-core 0.8.3 → 0.8.5-rc.10
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/README.md +38 -7
- package/cards/context.card.md +4 -4
- package/decks/anthropic/agent-sdk/PROMPT.md +9 -0
- package/decks/openai/codex-sdk/PROMPT.md +9 -0
- package/decks/openai/codex-sdk/codex_client.ts +109 -0
- package/decks/openai/codex-sdk/codex_sdk_bridge.deck.ts +36 -0
- package/esm/cards/context.card.md +9 -0
- package/esm/cards/end.card.md +10 -0
- package/esm/cards/generate-test-input.card.md +12 -0
- package/esm/cards/respond.card.md +10 -0
- package/esm/decks/anthropic/agent-sdk/PROMPT.md +9 -0
- package/esm/decks/openai/codex-sdk/PROMPT.md +9 -0
- package/esm/decks/openai/codex-sdk/codex_client.ts +109 -0
- package/esm/decks/openai/codex-sdk/codex_sdk_bridge.deck.ts +36 -0
- package/{script/deps/jsr.io/@std/collections/1.1.4 → esm/deps/jsr.io/@std/collections/1.1.6}/deep_merge.d.ts +2 -2
- package/esm/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.js +29 -19
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +1 -1
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.js +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/yaml/1.0.11 → esm/deps/jsr.io/@std/yaml/1.0.12}/_loader_state.d.ts +0 -5
- package/esm/deps/jsr.io/@std/yaml/1.0.12/_loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_loader_state.js +216 -175
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/yaml/1.0.11 → esm/deps/jsr.io/@std/yaml/1.0.12}/_type/map.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/yaml/1.0.11 → esm/deps/jsr.io/@std/yaml/1.0.12}/_type/seq.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.js +0 -2
- package/esm/mod.d.ts +10 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +4 -0
- package/esm/schemas/graders/contexts/conversation.d.ts +22 -0
- package/esm/schemas/graders/contexts/conversation.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation.js +17 -0
- package/esm/schemas/graders/contexts/conversation.ts +40 -0
- package/esm/schemas/graders/contexts/conversation.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/conversation.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation.zod.js +2 -0
- package/esm/schemas/graders/contexts/conversation.zod.ts +1 -0
- package/esm/schemas/graders/contexts/conversation_tools.d.ts +31 -0
- package/esm/schemas/graders/contexts/conversation_tools.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation_tools.js +25 -0
- package/esm/schemas/graders/contexts/conversation_tools.ts +63 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.js +2 -0
- package/esm/schemas/graders/contexts/conversation_tools.zod.ts +1 -0
- package/esm/schemas/graders/contexts/tools.d.ts +4 -0
- package/esm/schemas/graders/contexts/tools.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/tools.js +3 -0
- package/esm/schemas/graders/contexts/tools.ts +5 -0
- package/esm/schemas/graders/contexts/tools.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/tools.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/tools.zod.js +2 -0
- package/esm/schemas/graders/contexts/tools.zod.ts +1 -0
- package/esm/schemas/graders/contexts/turn.d.ts +10 -0
- package/esm/schemas/graders/contexts/turn.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn.js +8 -0
- package/esm/schemas/graders/contexts/turn.ts +17 -0
- package/esm/schemas/graders/contexts/turn.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/turn.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn.zod.js +2 -0
- package/esm/schemas/graders/contexts/turn.zod.ts +1 -0
- package/esm/schemas/graders/contexts/turn_tools.d.ts +32 -0
- package/esm/schemas/graders/contexts/turn_tools.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn_tools.js +28 -0
- package/esm/schemas/graders/contexts/turn_tools.ts +63 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.d.ts +3 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.d.ts.map +1 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.js +2 -0
- package/esm/schemas/graders/contexts/turn_tools.zod.ts +1 -0
- package/esm/schemas/graders/grader_output.d.ts +10 -0
- package/esm/schemas/graders/grader_output.d.ts.map +1 -0
- package/esm/schemas/graders/grader_output.js +8 -0
- package/esm/schemas/graders/grader_output.ts +15 -0
- package/esm/schemas/graders/grader_output.zod.d.ts +3 -0
- package/esm/schemas/graders/grader_output.zod.d.ts.map +1 -0
- package/esm/schemas/graders/grader_output.zod.js +2 -0
- package/esm/schemas/graders/grader_output.zod.ts +1 -0
- package/esm/schemas/graders/respond.d.ts +12 -0
- package/esm/schemas/graders/respond.d.ts.map +1 -0
- package/esm/schemas/graders/respond.js +10 -0
- package/esm/schemas/graders/respond.ts +19 -0
- package/esm/schemas/graders/respond.zod.d.ts +3 -0
- package/esm/schemas/graders/respond.zod.d.ts.map +1 -0
- package/esm/schemas/graders/respond.zod.js +2 -0
- package/esm/schemas/graders/respond.zod.ts +1 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.d.ts +5 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.js +5 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.ts +6 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.d.ts +3 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.js +2 -0
- package/esm/schemas/scenarios/plain_chat_input_optional.zod.ts +1 -0
- package/esm/schemas/scenarios/plain_chat_output.d.ts +5 -0
- package/esm/schemas/scenarios/plain_chat_output.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_output.js +4 -0
- package/esm/schemas/scenarios/plain_chat_output.ts +5 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.d.ts +3 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.d.ts.map +1 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.js +2 -0
- package/esm/schemas/scenarios/plain_chat_output.zod.ts +1 -0
- package/esm/snippets/context.md +8 -0
- package/esm/snippets/end.md +10 -0
- package/esm/snippets/generate-test-input.md +12 -0
- package/esm/snippets/init.md +12 -0
- package/esm/snippets/respond.md +10 -0
- package/esm/snippets/scenario-participant.md +10 -0
- package/esm/src/builtins.d.ts +2 -0
- package/esm/src/builtins.d.ts.map +1 -1
- package/esm/src/builtins.js +45 -1
- package/esm/src/constants.d.ts +0 -1
- package/esm/src/constants.d.ts.map +1 -1
- package/esm/src/constants.js +0 -4
- package/esm/src/loader.d.ts.map +1 -1
- package/esm/src/loader.js +159 -11
- package/esm/src/markdown.d.ts.map +1 -1
- package/esm/src/markdown.js +267 -41
- package/esm/src/permissions.d.ts +143 -0
- package/esm/src/permissions.d.ts.map +1 -0
- package/esm/src/permissions.js +406 -0
- package/esm/src/runtime.d.ts +43 -3
- package/esm/src/runtime.d.ts.map +1 -1
- package/esm/src/runtime.js +4369 -406
- package/esm/src/runtime_exec_host.d.ts +6 -0
- package/esm/src/runtime_exec_host.d.ts.map +1 -0
- package/esm/src/runtime_exec_host.js +17 -0
- package/esm/src/runtime_exec_host_contract.d.ts +23 -0
- package/esm/src/runtime_exec_host_contract.d.ts.map +1 -0
- package/esm/src/runtime_exec_host_contract.js +14 -0
- package/esm/src/runtime_exec_host_deno.d.ts +3 -0
- package/esm/src/runtime_exec_host_deno.d.ts.map +1 -0
- package/esm/src/runtime_exec_host_deno.js +35 -0
- package/esm/src/runtime_exec_host_unsupported.d.ts +3 -0
- package/esm/src/runtime_exec_host_unsupported.d.ts.map +1 -0
- package/esm/src/runtime_exec_host_unsupported.js +8 -0
- package/esm/src/runtime_worker_host.d.ts +6 -0
- package/esm/src/runtime_worker_host.d.ts.map +1 -0
- package/esm/src/runtime_worker_host.js +17 -0
- package/esm/src/runtime_worker_host_contract.d.ts +33 -0
- package/esm/src/runtime_worker_host_contract.d.ts.map +1 -0
- package/esm/src/runtime_worker_host_contract.js +14 -0
- package/esm/src/runtime_worker_host_deno.d.ts +3 -0
- package/esm/src/runtime_worker_host_deno.d.ts.map +1 -0
- package/esm/src/runtime_worker_host_deno.js +26 -0
- package/esm/src/runtime_worker_host_unsupported.d.ts +3 -0
- package/esm/src/runtime_worker_host_unsupported.d.ts.map +1 -0
- package/esm/src/runtime_worker_host_unsupported.js +8 -0
- package/esm/src/state.d.ts +1 -0
- package/esm/src/state.d.ts.map +1 -1
- package/esm/src/types.d.ts +259 -3
- package/esm/src/types.d.ts.map +1 -1
- package/package.json +73 -1
- package/schemas/graders/contexts/conversation.ts +32 -9
- package/schemas/graders/contexts/conversation.zod.ts +1 -0
- package/schemas/graders/contexts/conversation_tools.ts +63 -0
- package/schemas/graders/contexts/conversation_tools.zod.ts +1 -0
- package/schemas/graders/contexts/tools.ts +5 -0
- package/schemas/graders/contexts/tools.zod.ts +1 -0
- package/schemas/graders/contexts/turn.ts +8 -1
- package/schemas/graders/contexts/turn.zod.ts +1 -0
- package/schemas/graders/contexts/turn_tools.ts +63 -0
- package/schemas/graders/contexts/turn_tools.zod.ts +1 -0
- package/schemas/graders/grader_output.ts +9 -1
- package/schemas/graders/grader_output.zod.ts +1 -0
- package/schemas/graders/respond.ts +13 -3
- package/schemas/graders/respond.zod.ts +1 -0
- package/schemas/scenarios/plain_chat_input_optional.ts +6 -0
- package/schemas/scenarios/plain_chat_input_optional.zod.ts +1 -0
- package/schemas/scenarios/plain_chat_output.ts +5 -0
- package/schemas/scenarios/plain_chat_output.zod.ts +1 -0
- package/script/cards/context.card.md +9 -0
- package/script/cards/end.card.md +10 -0
- package/script/cards/generate-test-input.card.md +12 -0
- package/script/cards/respond.card.md +10 -0
- package/script/decks/anthropic/agent-sdk/PROMPT.md +9 -0
- package/script/decks/openai/codex-sdk/PROMPT.md +9 -0
- package/script/decks/openai/codex-sdk/codex_client.ts +109 -0
- package/script/decks/openai/codex-sdk/codex_sdk_bridge.deck.ts +36 -0
- package/{esm/deps/jsr.io/@std/collections/1.1.4 → script/deps/jsr.io/@std/collections/1.1.6}/deep_merge.d.ts +2 -2
- package/script/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/collections/{1.1.4 → 1.1.6}/deep_merge.js +29 -19
- package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +1 -1
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.js +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/yaml/1.0.11 → script/deps/jsr.io/@std/yaml/1.0.12}/_loader_state.d.ts +0 -5
- package/script/deps/jsr.io/@std/yaml/1.0.12/_loader_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_loader_state.js +216 -175
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/yaml/1.0.11 → script/deps/jsr.io/@std/yaml/1.0.12}/_type/map.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/yaml/1.0.11 → script/deps/jsr.io/@std/yaml/1.0.12}/_type/seq.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.js +0 -2
- package/script/mod.d.ts +10 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +12 -1
- package/script/schemas/graders/contexts/conversation.d.ts +22 -0
- package/script/schemas/graders/contexts/conversation.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation.js +20 -0
- package/script/schemas/graders/contexts/conversation.ts +40 -0
- package/script/schemas/graders/contexts/conversation.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/conversation.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation.zod.js +9 -0
- package/script/schemas/graders/contexts/conversation.zod.ts +1 -0
- package/script/schemas/graders/contexts/conversation_tools.d.ts +31 -0
- package/script/schemas/graders/contexts/conversation_tools.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation_tools.js +28 -0
- package/script/schemas/graders/contexts/conversation_tools.ts +63 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.js +9 -0
- package/script/schemas/graders/contexts/conversation_tools.zod.ts +1 -0
- package/script/schemas/graders/contexts/tools.d.ts +4 -0
- package/script/schemas/graders/contexts/tools.d.ts.map +1 -0
- package/script/schemas/graders/contexts/tools.js +12 -0
- package/script/schemas/graders/contexts/tools.ts +5 -0
- package/script/schemas/graders/contexts/tools.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/tools.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/tools.zod.js +9 -0
- package/script/schemas/graders/contexts/tools.zod.ts +1 -0
- package/script/schemas/graders/contexts/turn.d.ts +10 -0
- package/script/schemas/graders/contexts/turn.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn.js +10 -0
- package/script/schemas/graders/contexts/turn.ts +17 -0
- package/script/schemas/graders/contexts/turn.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/turn.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn.zod.js +9 -0
- package/script/schemas/graders/contexts/turn.zod.ts +1 -0
- package/script/schemas/graders/contexts/turn_tools.d.ts +32 -0
- package/script/schemas/graders/contexts/turn_tools.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn_tools.js +31 -0
- package/script/schemas/graders/contexts/turn_tools.ts +63 -0
- package/script/schemas/graders/contexts/turn_tools.zod.d.ts +3 -0
- package/script/schemas/graders/contexts/turn_tools.zod.d.ts.map +1 -0
- package/script/schemas/graders/contexts/turn_tools.zod.js +9 -0
- package/script/schemas/graders/contexts/turn_tools.zod.ts +1 -0
- package/script/schemas/graders/grader_output.d.ts +10 -0
- package/script/schemas/graders/grader_output.d.ts.map +1 -0
- package/script/schemas/graders/grader_output.js +10 -0
- package/script/schemas/graders/grader_output.ts +15 -0
- package/script/schemas/graders/grader_output.zod.d.ts +3 -0
- package/script/schemas/graders/grader_output.zod.d.ts.map +1 -0
- package/script/schemas/graders/grader_output.zod.js +9 -0
- package/script/schemas/graders/grader_output.zod.ts +1 -0
- package/script/schemas/graders/respond.d.ts +12 -0
- package/script/schemas/graders/respond.d.ts.map +1 -0
- package/script/schemas/graders/respond.js +12 -0
- package/script/schemas/graders/respond.ts +19 -0
- package/script/schemas/graders/respond.zod.d.ts +3 -0
- package/script/schemas/graders/respond.zod.d.ts.map +1 -0
- package/script/schemas/graders/respond.zod.js +9 -0
- package/script/schemas/graders/respond.zod.ts +1 -0
- package/script/schemas/scenarios/plain_chat_input_optional.d.ts +5 -0
- package/script/schemas/scenarios/plain_chat_input_optional.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_input_optional.js +7 -0
- package/script/schemas/scenarios/plain_chat_input_optional.ts +6 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.d.ts +3 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.js +9 -0
- package/script/schemas/scenarios/plain_chat_input_optional.zod.ts +1 -0
- package/script/schemas/scenarios/plain_chat_output.d.ts +5 -0
- package/script/schemas/scenarios/plain_chat_output.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_output.js +6 -0
- package/script/schemas/scenarios/plain_chat_output.ts +5 -0
- package/script/schemas/scenarios/plain_chat_output.zod.d.ts +3 -0
- package/script/schemas/scenarios/plain_chat_output.zod.d.ts.map +1 -0
- package/script/schemas/scenarios/plain_chat_output.zod.js +9 -0
- package/script/schemas/scenarios/plain_chat_output.zod.ts +1 -0
- package/script/snippets/context.md +8 -0
- package/script/snippets/end.md +10 -0
- package/script/snippets/generate-test-input.md +12 -0
- package/script/snippets/init.md +12 -0
- package/script/snippets/respond.md +10 -0
- package/script/snippets/scenario-participant.md +10 -0
- package/script/src/builtins.d.ts +2 -0
- package/script/src/builtins.d.ts.map +1 -1
- package/script/src/builtins.js +47 -1
- package/script/src/constants.d.ts +0 -1
- package/script/src/constants.d.ts.map +1 -1
- package/script/src/constants.js +1 -5
- package/script/src/loader.d.ts.map +1 -1
- package/script/src/loader.js +158 -10
- package/script/src/markdown.d.ts.map +1 -1
- package/script/src/markdown.js +267 -41
- package/script/src/permissions.d.ts +143 -0
- package/script/src/permissions.d.ts.map +1 -0
- package/script/src/permissions.js +453 -0
- package/script/src/runtime.d.ts +43 -3
- package/script/src/runtime.d.ts.map +1 -1
- package/script/src/runtime.js +4371 -405
- package/script/src/runtime_exec_host.d.ts +6 -0
- package/script/src/runtime_exec_host.d.ts.map +1 -0
- package/script/src/runtime_exec_host.js +56 -0
- package/script/src/runtime_exec_host_contract.d.ts +23 -0
- package/script/src/runtime_exec_host_contract.d.ts.map +1 -0
- package/script/src/runtime_exec_host_contract.js +18 -0
- package/script/src/runtime_exec_host_deno.d.ts +3 -0
- package/script/src/runtime_exec_host_deno.d.ts.map +1 -0
- package/script/src/runtime_exec_host_deno.js +71 -0
- package/script/src/runtime_exec_host_unsupported.d.ts +3 -0
- package/script/src/runtime_exec_host_unsupported.d.ts.map +1 -0
- package/script/src/runtime_exec_host_unsupported.js +11 -0
- package/script/src/runtime_worker_host.d.ts +6 -0
- package/script/src/runtime_worker_host.d.ts.map +1 -0
- package/script/src/runtime_worker_host.js +56 -0
- package/script/src/runtime_worker_host_contract.d.ts +33 -0
- package/script/src/runtime_worker_host_contract.d.ts.map +1 -0
- package/script/src/runtime_worker_host_contract.js +18 -0
- package/script/src/runtime_worker_host_deno.d.ts +3 -0
- package/script/src/runtime_worker_host_deno.d.ts.map +1 -0
- package/script/src/runtime_worker_host_deno.js +62 -0
- package/script/src/runtime_worker_host_unsupported.d.ts +3 -0
- package/script/src/runtime_worker_host_unsupported.d.ts.map +1 -0
- package/script/src/runtime_worker_host_unsupported.js +11 -0
- package/script/src/state.d.ts +1 -0
- package/script/src/state.d.ts.map +1 -1
- package/script/src/types.d.ts +259 -3
- package/script/src/types.d.ts.map +1 -1
- package/snippets/context.md +8 -0
- package/snippets/end.md +10 -0
- package/snippets/generate-test-input.md +12 -0
- package/snippets/init.md +12 -0
- package/snippets/respond.md +10 -0
- package/snippets/scenario-participant.md +10 -0
- package/esm/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts +0 -6
- package/esm/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/collections/1.1.4/_utils.js +0 -18
- package/esm/deps/jsr.io/@std/yaml/1.0.11/_loader_state.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts +0 -6
- package/script/deps/jsr.io/@std/collections/1.1.4/_utils.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/collections/1.1.4/_utils.js +0 -21
- package/script/deps/jsr.io/@std/yaml/1.0.11/_loader_state.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.js +0 -0
- /package/esm/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_chars.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_schema.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/binary.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/bool.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/float.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/int.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/map.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/merge.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/nil.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/omap.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/pairs.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/regexp.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/seq.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/set.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/str.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/timestamp.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type/undefined.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_type.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.d.ts +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/_utils.js +0 -0
- /package/script/deps/jsr.io/@std/yaml/{1.0.11 → 1.0.12}/parse.d.ts +0 -0
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
4
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
5
|
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
6
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
7
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
|
+
};
|
|
6
12
|
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
7
13
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
8
14
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
9
15
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10
16
|
};
|
|
11
|
-
var _LoaderState_instances, _LoaderState_createError;
|
|
17
|
+
var _Scanner_length, _LoaderState_instances, _LoaderState_scanner, _LoaderState_createError;
|
|
12
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
19
|
exports.LoaderState = void 0;
|
|
14
20
|
const _chars_js_1 = require("./_chars.js");
|
|
@@ -140,21 +146,41 @@ function writeFoldedLines(count) {
|
|
|
140
146
|
return "\n".repeat(count - 1);
|
|
141
147
|
return "";
|
|
142
148
|
}
|
|
143
|
-
class
|
|
144
|
-
constructor(
|
|
145
|
-
|
|
146
|
-
Object.defineProperty(this, "input", {
|
|
149
|
+
class Scanner {
|
|
150
|
+
constructor(source) {
|
|
151
|
+
Object.defineProperty(this, "source", {
|
|
147
152
|
enumerable: true,
|
|
148
153
|
configurable: true,
|
|
149
154
|
writable: true,
|
|
150
155
|
value: void 0
|
|
151
156
|
});
|
|
152
|
-
|
|
157
|
+
_Scanner_length.set(this, void 0);
|
|
158
|
+
Object.defineProperty(this, "position", {
|
|
153
159
|
enumerable: true,
|
|
154
160
|
configurable: true,
|
|
155
161
|
writable: true,
|
|
156
|
-
value:
|
|
162
|
+
value: 0
|
|
157
163
|
});
|
|
164
|
+
// Use 0 as string terminator. That significantly simplifies bounds check.
|
|
165
|
+
source += "\0";
|
|
166
|
+
this.source = source;
|
|
167
|
+
__classPrivateFieldSet(this, _Scanner_length, source.length, "f");
|
|
168
|
+
}
|
|
169
|
+
peek(offset = 0) {
|
|
170
|
+
return this.source.charCodeAt(this.position + offset);
|
|
171
|
+
}
|
|
172
|
+
next() {
|
|
173
|
+
this.position += 1;
|
|
174
|
+
}
|
|
175
|
+
eof() {
|
|
176
|
+
return this.position >= __classPrivateFieldGet(this, _Scanner_length, "f") - 1;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
_Scanner_length = new WeakMap();
|
|
180
|
+
class LoaderState {
|
|
181
|
+
constructor(input, { schema = _schema_js_1.DEFAULT_SCHEMA, onWarning, allowDuplicateKeys = false, }) {
|
|
182
|
+
_LoaderState_instances.add(this);
|
|
183
|
+
_LoaderState_scanner.set(this, void 0);
|
|
158
184
|
Object.defineProperty(this, "lineIndent", {
|
|
159
185
|
enumerable: true,
|
|
160
186
|
configurable: true,
|
|
@@ -167,12 +193,6 @@ class LoaderState {
|
|
|
167
193
|
writable: true,
|
|
168
194
|
value: 0
|
|
169
195
|
});
|
|
170
|
-
Object.defineProperty(this, "position", {
|
|
171
|
-
enumerable: true,
|
|
172
|
-
configurable: true,
|
|
173
|
-
writable: true,
|
|
174
|
-
value: 0
|
|
175
|
-
});
|
|
176
196
|
Object.defineProperty(this, "line", {
|
|
177
197
|
enumerable: true,
|
|
178
198
|
configurable: true,
|
|
@@ -221,43 +241,39 @@ class LoaderState {
|
|
|
221
241
|
writable: true,
|
|
222
242
|
value: new Map()
|
|
223
243
|
});
|
|
224
|
-
this
|
|
244
|
+
__classPrivateFieldSet(this, _LoaderState_scanner, new Scanner(input), "f");
|
|
225
245
|
this.onWarning = onWarning;
|
|
226
246
|
this.allowDuplicateKeys = allowDuplicateKeys;
|
|
227
247
|
this.implicitTypes = schema.implicitTypes;
|
|
228
248
|
this.typeMap = schema.typeMap;
|
|
229
|
-
this.length = input.length;
|
|
230
249
|
this.readIndent();
|
|
231
250
|
}
|
|
232
251
|
skipWhitespaces() {
|
|
233
|
-
let ch = this.peek();
|
|
252
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
234
253
|
while ((0, _chars_js_1.isWhiteSpace)(ch)) {
|
|
235
|
-
|
|
254
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
255
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
236
256
|
}
|
|
237
257
|
}
|
|
238
258
|
skipComment() {
|
|
239
|
-
let ch = this.peek();
|
|
259
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
240
260
|
if (ch !== _chars_js_1.SHARP)
|
|
241
261
|
return;
|
|
242
|
-
|
|
262
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
263
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
243
264
|
while (ch !== 0 && !(0, _chars_js_1.isEOL)(ch)) {
|
|
244
|
-
|
|
265
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
266
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
245
267
|
}
|
|
246
268
|
}
|
|
247
269
|
readIndent() {
|
|
248
|
-
let
|
|
249
|
-
while (
|
|
270
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
271
|
+
while (ch === _chars_js_1.SPACE) {
|
|
250
272
|
this.lineIndent += 1;
|
|
251
|
-
|
|
273
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
274
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
252
275
|
}
|
|
253
276
|
}
|
|
254
|
-
peek(offset = 0) {
|
|
255
|
-
return this.input.charCodeAt(this.position + offset);
|
|
256
|
-
}
|
|
257
|
-
next() {
|
|
258
|
-
this.position += 1;
|
|
259
|
-
return this.peek();
|
|
260
|
-
}
|
|
261
277
|
dispatchWarning(message) {
|
|
262
278
|
const error = __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, message);
|
|
263
279
|
this.onWarning?.(error);
|
|
@@ -300,7 +316,7 @@ class LoaderState {
|
|
|
300
316
|
}
|
|
301
317
|
captureSegment(start, end, checkJson) {
|
|
302
318
|
if (start < end) {
|
|
303
|
-
const result = this.
|
|
319
|
+
const result = __classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(start, end);
|
|
304
320
|
if (checkJson) {
|
|
305
321
|
for (let position = 0; position < result.length; position++) {
|
|
306
322
|
const character = result.charCodeAt(position);
|
|
@@ -321,21 +337,21 @@ class LoaderState {
|
|
|
321
337
|
const result = [];
|
|
322
338
|
if (anchor !== null)
|
|
323
339
|
this.anchorMap.set(anchor, result);
|
|
324
|
-
let ch = this.peek();
|
|
340
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
325
341
|
while (ch !== 0) {
|
|
326
342
|
if (ch !== _chars_js_1.MINUS) {
|
|
327
343
|
break;
|
|
328
344
|
}
|
|
329
|
-
const following = this.peek(1);
|
|
345
|
+
const following = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(1);
|
|
330
346
|
if (!(0, _chars_js_1.isWhiteSpaceOrEOL)(following)) {
|
|
331
347
|
break;
|
|
332
348
|
}
|
|
333
349
|
detected = true;
|
|
334
|
-
this.
|
|
350
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
335
351
|
if (this.skipSeparationSpace(true, -1)) {
|
|
336
352
|
if (this.lineIndent <= nodeIndent) {
|
|
337
353
|
result.push(null);
|
|
338
|
-
ch = this.peek();
|
|
354
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
339
355
|
continue;
|
|
340
356
|
}
|
|
341
357
|
}
|
|
@@ -349,7 +365,7 @@ class LoaderState {
|
|
|
349
365
|
if (newState)
|
|
350
366
|
result.push(newState.result);
|
|
351
367
|
this.skipSeparationSpace(true, -1);
|
|
352
|
-
ch = this.peek();
|
|
368
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
353
369
|
if ((this.line === line || this.lineIndent > nodeIndent) && ch !== 0) {
|
|
354
370
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block sequence: bad indentation of a sequence entry");
|
|
355
371
|
}
|
|
@@ -413,7 +429,7 @@ class LoaderState {
|
|
|
413
429
|
!overridableKeys.has(keyNode) &&
|
|
414
430
|
Object.hasOwn(result, keyNode)) {
|
|
415
431
|
this.line = startLine || this.line;
|
|
416
|
-
this.position = startPos || this.position;
|
|
432
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").position = startPos || __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
417
433
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot store mapping pair: duplicated key");
|
|
418
434
|
}
|
|
419
435
|
Object.defineProperty(result, keyNode, {
|
|
@@ -427,39 +443,39 @@ class LoaderState {
|
|
|
427
443
|
return result;
|
|
428
444
|
}
|
|
429
445
|
readLineBreak() {
|
|
430
|
-
const ch = this.peek();
|
|
446
|
+
const ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
431
447
|
if (ch === _chars_js_1.LINE_FEED) {
|
|
432
|
-
this.
|
|
448
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
433
449
|
}
|
|
434
450
|
else if (ch === _chars_js_1.CARRIAGE_RETURN) {
|
|
435
|
-
this.
|
|
436
|
-
if (this.peek() === _chars_js_1.LINE_FEED) {
|
|
437
|
-
this.
|
|
451
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
452
|
+
if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").peek() === _chars_js_1.LINE_FEED) {
|
|
453
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
438
454
|
}
|
|
439
455
|
}
|
|
440
456
|
else {
|
|
441
457
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read line: line break not found");
|
|
442
458
|
}
|
|
443
459
|
this.line += 1;
|
|
444
|
-
this.lineStart = this.position;
|
|
460
|
+
this.lineStart = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
445
461
|
}
|
|
446
462
|
skipSeparationSpace(allowComments, checkIndent) {
|
|
447
463
|
let lineBreaks = 0;
|
|
448
|
-
let ch = this.peek();
|
|
464
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
449
465
|
while (ch !== 0) {
|
|
450
466
|
this.skipWhitespaces();
|
|
451
|
-
ch = this.peek();
|
|
467
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
452
468
|
if (allowComments) {
|
|
453
469
|
this.skipComment();
|
|
454
|
-
ch = this.peek();
|
|
470
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
455
471
|
}
|
|
456
472
|
if ((0, _chars_js_1.isEOL)(ch)) {
|
|
457
473
|
this.readLineBreak();
|
|
458
|
-
ch = this.peek();
|
|
474
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
459
475
|
lineBreaks++;
|
|
460
476
|
this.lineIndent = 0;
|
|
461
477
|
this.readIndent();
|
|
462
|
-
ch = this.peek();
|
|
478
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
463
479
|
}
|
|
464
480
|
else {
|
|
465
481
|
break;
|
|
@@ -473,13 +489,13 @@ class LoaderState {
|
|
|
473
489
|
return lineBreaks;
|
|
474
490
|
}
|
|
475
491
|
testDocumentSeparator() {
|
|
476
|
-
let ch = this.peek();
|
|
477
|
-
// Condition this.position === this.lineStart is tested
|
|
492
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
493
|
+
// Condition this.#scanner.position === this.lineStart is tested
|
|
478
494
|
// in parent on each call, for efficiency. No needs to test here again.
|
|
479
495
|
if ((ch === _chars_js_1.MINUS || ch === _chars_js_1.DOT) &&
|
|
480
|
-
ch === this.peek(1) &&
|
|
481
|
-
ch === this.peek(2)) {
|
|
482
|
-
ch = this.peek(3);
|
|
496
|
+
ch === __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(1) &&
|
|
497
|
+
ch === __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(2)) {
|
|
498
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(3);
|
|
483
499
|
if (ch === 0 || (0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
484
500
|
return true;
|
|
485
501
|
}
|
|
@@ -487,7 +503,7 @@ class LoaderState {
|
|
|
487
503
|
return false;
|
|
488
504
|
}
|
|
489
505
|
readPlainScalar(tag, anchor, nodeIndent, withinFlowCollection) {
|
|
490
|
-
let ch = this.peek();
|
|
506
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
491
507
|
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(ch) ||
|
|
492
508
|
(0, _chars_js_1.isFlowIndicator)(ch) ||
|
|
493
509
|
ch === _chars_js_1.SHARP ||
|
|
@@ -505,32 +521,33 @@ class LoaderState {
|
|
|
505
521
|
}
|
|
506
522
|
let following;
|
|
507
523
|
if (ch === _chars_js_1.QUESTION || ch === _chars_js_1.MINUS) {
|
|
508
|
-
following = this.peek(1);
|
|
524
|
+
following = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(1);
|
|
509
525
|
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(following) ||
|
|
510
526
|
(withinFlowCollection && (0, _chars_js_1.isFlowIndicator)(following))) {
|
|
511
527
|
return;
|
|
512
528
|
}
|
|
513
529
|
}
|
|
514
530
|
let result = "";
|
|
515
|
-
let captureEnd = this.position;
|
|
516
|
-
let captureStart = this.position;
|
|
531
|
+
let captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
532
|
+
let captureStart = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
517
533
|
let hasPendingContent = false;
|
|
518
534
|
let line = 0;
|
|
519
535
|
while (ch !== 0) {
|
|
520
536
|
if (ch === _chars_js_1.COLON) {
|
|
521
|
-
following = this.peek(1);
|
|
537
|
+
following = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(1);
|
|
522
538
|
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(following) ||
|
|
523
539
|
(withinFlowCollection && (0, _chars_js_1.isFlowIndicator)(following))) {
|
|
524
540
|
break;
|
|
525
541
|
}
|
|
526
542
|
}
|
|
527
543
|
else if (ch === _chars_js_1.SHARP) {
|
|
528
|
-
const preceding = this.peek(-1);
|
|
544
|
+
const preceding = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(-1);
|
|
529
545
|
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(preceding)) {
|
|
530
546
|
break;
|
|
531
547
|
}
|
|
532
548
|
}
|
|
533
|
-
else if ((this.position === this.lineStart &&
|
|
549
|
+
else if ((__classPrivateFieldGet(this, _LoaderState_scanner, "f").position === this.lineStart &&
|
|
550
|
+
this.testDocumentSeparator()) ||
|
|
534
551
|
(withinFlowCollection && (0, _chars_js_1.isFlowIndicator)(ch))) {
|
|
535
552
|
break;
|
|
536
553
|
}
|
|
@@ -541,11 +558,11 @@ class LoaderState {
|
|
|
541
558
|
this.skipSeparationSpace(false, -1);
|
|
542
559
|
if (this.lineIndent >= nodeIndent) {
|
|
543
560
|
hasPendingContent = true;
|
|
544
|
-
ch = this.peek();
|
|
561
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
545
562
|
continue;
|
|
546
563
|
}
|
|
547
564
|
else {
|
|
548
|
-
this.position = captureEnd;
|
|
565
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").position = captureEnd;
|
|
549
566
|
this.line = line;
|
|
550
567
|
this.lineStart = lineStart;
|
|
551
568
|
this.lineIndent = lineIndent;
|
|
@@ -557,13 +574,14 @@ class LoaderState {
|
|
|
557
574
|
if (segment)
|
|
558
575
|
result += segment;
|
|
559
576
|
result += writeFoldedLines(this.line - line);
|
|
560
|
-
captureStart = captureEnd = this.position;
|
|
577
|
+
captureStart = captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
561
578
|
hasPendingContent = false;
|
|
562
579
|
}
|
|
563
580
|
if (!(0, _chars_js_1.isWhiteSpace)(ch)) {
|
|
564
|
-
captureEnd = this.position + 1;
|
|
581
|
+
captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position + 1;
|
|
565
582
|
}
|
|
566
|
-
|
|
583
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
584
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
567
585
|
}
|
|
568
586
|
const segment = this.captureSegment(captureStart, captureEnd, false);
|
|
569
587
|
if (segment)
|
|
@@ -574,24 +592,25 @@ class LoaderState {
|
|
|
574
592
|
return { tag, anchor, kind: "scalar", result };
|
|
575
593
|
}
|
|
576
594
|
readSingleQuotedScalar(tag, anchor, nodeIndent) {
|
|
577
|
-
let ch = this.peek();
|
|
595
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
578
596
|
if (ch !== _chars_js_1.SINGLE_QUOTE)
|
|
579
597
|
return;
|
|
580
598
|
let result = "";
|
|
581
|
-
this.
|
|
582
|
-
let captureStart = this.position;
|
|
583
|
-
let captureEnd = this.position;
|
|
584
|
-
ch = this.peek();
|
|
599
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
600
|
+
let captureStart = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
601
|
+
let captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
602
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
585
603
|
while (ch !== 0) {
|
|
586
604
|
if (ch === _chars_js_1.SINGLE_QUOTE) {
|
|
587
|
-
const segment = this.captureSegment(captureStart, this.position, true);
|
|
605
|
+
const segment = this.captureSegment(captureStart, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position, true);
|
|
588
606
|
if (segment)
|
|
589
607
|
result += segment;
|
|
590
|
-
|
|
608
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
609
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
591
610
|
if (ch === _chars_js_1.SINGLE_QUOTE) {
|
|
592
|
-
captureStart = this.position;
|
|
593
|
-
this.
|
|
594
|
-
captureEnd = this.position;
|
|
611
|
+
captureStart = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
612
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
613
|
+
captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
595
614
|
}
|
|
596
615
|
else {
|
|
597
616
|
if (anchor !== null)
|
|
@@ -604,57 +623,59 @@ class LoaderState {
|
|
|
604
623
|
if (segment)
|
|
605
624
|
result += segment;
|
|
606
625
|
result += writeFoldedLines(this.skipSeparationSpace(false, nodeIndent));
|
|
607
|
-
captureStart = captureEnd = this.position;
|
|
626
|
+
captureStart = captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
608
627
|
}
|
|
609
|
-
else if (this.position === this.lineStart &&
|
|
628
|
+
else if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").position === this.lineStart &&
|
|
610
629
|
this.testDocumentSeparator()) {
|
|
611
630
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the document within a single quoted scalar");
|
|
612
631
|
}
|
|
613
632
|
else {
|
|
614
|
-
this.
|
|
615
|
-
captureEnd = this.position;
|
|
633
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
634
|
+
captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
616
635
|
}
|
|
617
|
-
ch = this.peek();
|
|
636
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
618
637
|
}
|
|
619
638
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the stream within a single quoted scalar");
|
|
620
639
|
}
|
|
621
640
|
readDoubleQuotedScalar(tag, anchor, nodeIndent) {
|
|
622
|
-
let ch = this.peek();
|
|
641
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
623
642
|
if (ch !== _chars_js_1.DOUBLE_QUOTE)
|
|
624
643
|
return;
|
|
625
644
|
let result = "";
|
|
626
|
-
this.
|
|
627
|
-
let captureEnd = this.position;
|
|
628
|
-
let captureStart = this.position;
|
|
645
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
646
|
+
let captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
647
|
+
let captureStart = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
629
648
|
let tmp;
|
|
630
|
-
ch = this.peek();
|
|
649
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
631
650
|
while (ch !== 0) {
|
|
632
651
|
if (ch === _chars_js_1.DOUBLE_QUOTE) {
|
|
633
|
-
const segment = this.captureSegment(captureStart, this.position, true);
|
|
652
|
+
const segment = this.captureSegment(captureStart, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position, true);
|
|
634
653
|
if (segment)
|
|
635
654
|
result += segment;
|
|
636
|
-
this.
|
|
655
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
637
656
|
if (anchor !== null)
|
|
638
657
|
this.anchorMap.set(anchor, result);
|
|
639
658
|
return { tag, anchor, kind: "scalar", result };
|
|
640
659
|
}
|
|
641
660
|
if (ch === _chars_js_1.BACKSLASH) {
|
|
642
|
-
const segment = this.captureSegment(captureStart, this.position, true);
|
|
661
|
+
const segment = this.captureSegment(captureStart, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position, true);
|
|
643
662
|
if (segment)
|
|
644
663
|
result += segment;
|
|
645
|
-
|
|
664
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
665
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
646
666
|
if ((0, _chars_js_1.isEOL)(ch)) {
|
|
647
667
|
this.skipSeparationSpace(false, nodeIndent);
|
|
648
668
|
}
|
|
649
669
|
else if (ch < 256 && SIMPLE_ESCAPE_SEQUENCES.has(ch)) {
|
|
650
670
|
result += SIMPLE_ESCAPE_SEQUENCES.get(ch);
|
|
651
|
-
this.
|
|
671
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
652
672
|
}
|
|
653
673
|
else if ((tmp = ESCAPED_HEX_LENGTHS.get(ch) ?? 0) > 0) {
|
|
654
674
|
let hexLength = tmp;
|
|
655
675
|
let hexResult = 0;
|
|
656
676
|
for (; hexLength > 0; hexLength--) {
|
|
657
|
-
|
|
677
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
678
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
658
679
|
if ((tmp = hexCharCodeToNumber(ch)) >= 0) {
|
|
659
680
|
hexResult = (hexResult << 4) + tmp;
|
|
660
681
|
}
|
|
@@ -663,34 +684,34 @@ class LoaderState {
|
|
|
663
684
|
}
|
|
664
685
|
}
|
|
665
686
|
result += codepointToChar(hexResult);
|
|
666
|
-
this.
|
|
687
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
667
688
|
}
|
|
668
689
|
else {
|
|
669
690
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read double quoted scalar: unknown escape sequence");
|
|
670
691
|
}
|
|
671
|
-
captureStart = captureEnd = this.position;
|
|
692
|
+
captureStart = captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
672
693
|
}
|
|
673
694
|
else if ((0, _chars_js_1.isEOL)(ch)) {
|
|
674
695
|
const segment = this.captureSegment(captureStart, captureEnd, true);
|
|
675
696
|
if (segment)
|
|
676
697
|
result += segment;
|
|
677
698
|
result += writeFoldedLines(this.skipSeparationSpace(false, nodeIndent));
|
|
678
|
-
captureStart = captureEnd = this.position;
|
|
699
|
+
captureStart = captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
679
700
|
}
|
|
680
|
-
else if (this.position === this.lineStart &&
|
|
701
|
+
else if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").position === this.lineStart &&
|
|
681
702
|
this.testDocumentSeparator()) {
|
|
682
703
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the document within a double quoted scalar");
|
|
683
704
|
}
|
|
684
705
|
else {
|
|
685
|
-
this.
|
|
686
|
-
captureEnd = this.position;
|
|
706
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
707
|
+
captureEnd = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
687
708
|
}
|
|
688
|
-
ch = this.peek();
|
|
709
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
689
710
|
}
|
|
690
711
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the stream within a double quoted scalar");
|
|
691
712
|
}
|
|
692
713
|
readFlowCollection(tag, anchor, nodeIndent) {
|
|
693
|
-
let ch = this.peek();
|
|
714
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
694
715
|
let terminator;
|
|
695
716
|
let isMapping = true;
|
|
696
717
|
let result = {};
|
|
@@ -707,7 +728,8 @@ class LoaderState {
|
|
|
707
728
|
}
|
|
708
729
|
if (anchor !== null)
|
|
709
730
|
this.anchorMap.set(anchor, result);
|
|
710
|
-
|
|
731
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
732
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
711
733
|
let readNext = true;
|
|
712
734
|
let valueNode = null;
|
|
713
735
|
let keyNode = null;
|
|
@@ -719,9 +741,9 @@ class LoaderState {
|
|
|
719
741
|
const overridableKeys = new Set();
|
|
720
742
|
while (ch !== 0) {
|
|
721
743
|
this.skipSeparationSpace(true, nodeIndent);
|
|
722
|
-
ch = this.peek();
|
|
744
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
723
745
|
if (ch === terminator) {
|
|
724
|
-
this.
|
|
746
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
725
747
|
const kind = isMapping ? "mapping" : "sequence";
|
|
726
748
|
return { tag, anchor, kind, result };
|
|
727
749
|
}
|
|
@@ -731,10 +753,10 @@ class LoaderState {
|
|
|
731
753
|
keyTag = keyNode = valueNode = null;
|
|
732
754
|
isPair = isExplicitPair = false;
|
|
733
755
|
if (ch === _chars_js_1.QUESTION) {
|
|
734
|
-
following = this.peek(1);
|
|
756
|
+
following = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(1);
|
|
735
757
|
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(following)) {
|
|
736
758
|
isPair = isExplicitPair = true;
|
|
737
|
-
this.
|
|
759
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
738
760
|
this.skipSeparationSpace(true, nodeIndent);
|
|
739
761
|
}
|
|
740
762
|
}
|
|
@@ -750,10 +772,11 @@ class LoaderState {
|
|
|
750
772
|
keyNode = newState.result;
|
|
751
773
|
}
|
|
752
774
|
this.skipSeparationSpace(true, nodeIndent);
|
|
753
|
-
ch = this.peek();
|
|
775
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
754
776
|
if ((isExplicitPair || this.line === line) && ch === _chars_js_1.COLON) {
|
|
755
777
|
isPair = true;
|
|
756
|
-
|
|
778
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
779
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
757
780
|
this.skipSeparationSpace(true, nodeIndent);
|
|
758
781
|
const newState = this.composeNode({
|
|
759
782
|
parentIndent: nodeIndent,
|
|
@@ -774,10 +797,11 @@ class LoaderState {
|
|
|
774
797
|
result.push(keyNode);
|
|
775
798
|
}
|
|
776
799
|
this.skipSeparationSpace(true, nodeIndent);
|
|
777
|
-
ch = this.peek();
|
|
800
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
778
801
|
if (ch === _chars_js_1.COMMA) {
|
|
779
802
|
readNext = true;
|
|
780
|
-
|
|
803
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
804
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
781
805
|
}
|
|
782
806
|
else {
|
|
783
807
|
readNext = false;
|
|
@@ -794,7 +818,7 @@ class LoaderState {
|
|
|
794
818
|
let textIndent = nodeIndent;
|
|
795
819
|
let emptyLines = 0;
|
|
796
820
|
let atMoreIndented = false;
|
|
797
|
-
let ch = this.peek();
|
|
821
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
798
822
|
let folding = false;
|
|
799
823
|
if (ch === _chars_js_1.VERTICAL_LINE) {
|
|
800
824
|
folding = false;
|
|
@@ -808,7 +832,8 @@ class LoaderState {
|
|
|
808
832
|
let result = "";
|
|
809
833
|
let tmp = 0;
|
|
810
834
|
while (ch !== 0) {
|
|
811
|
-
|
|
835
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
836
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
812
837
|
if (ch === _chars_js_1.PLUS || ch === _chars_js_1.MINUS) {
|
|
813
838
|
if (CHOMPING_CLIP === chomping) {
|
|
814
839
|
chomping = ch === _chars_js_1.PLUS ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
@@ -836,16 +861,17 @@ class LoaderState {
|
|
|
836
861
|
if ((0, _chars_js_1.isWhiteSpace)(ch)) {
|
|
837
862
|
this.skipWhitespaces();
|
|
838
863
|
this.skipComment();
|
|
839
|
-
ch = this.peek();
|
|
864
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
840
865
|
}
|
|
841
866
|
while (ch !== 0) {
|
|
842
867
|
this.readLineBreak();
|
|
843
868
|
this.lineIndent = 0;
|
|
844
|
-
ch = this.peek();
|
|
869
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
845
870
|
while ((!detectedIndent || this.lineIndent < textIndent) &&
|
|
846
871
|
ch === _chars_js_1.SPACE) {
|
|
847
872
|
this.lineIndent++;
|
|
848
|
-
|
|
873
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
874
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
849
875
|
}
|
|
850
876
|
if (!detectedIndent && this.lineIndent > textIndent) {
|
|
851
877
|
textIndent = this.lineIndent;
|
|
@@ -902,11 +928,12 @@ class LoaderState {
|
|
|
902
928
|
didReadContent = true;
|
|
903
929
|
detectedIndent = true;
|
|
904
930
|
emptyLines = 0;
|
|
905
|
-
const captureStart = this.position;
|
|
931
|
+
const captureStart = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
906
932
|
while (!(0, _chars_js_1.isEOL)(ch) && ch !== 0) {
|
|
907
|
-
|
|
933
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
934
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
908
935
|
}
|
|
909
|
-
const segment = this.captureSegment(captureStart, this.position, false);
|
|
936
|
+
const segment = this.captureSegment(captureStart, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position, false);
|
|
910
937
|
if (segment)
|
|
911
938
|
result += segment;
|
|
912
939
|
}
|
|
@@ -927,11 +954,11 @@ class LoaderState {
|
|
|
927
954
|
let detected = false;
|
|
928
955
|
if (anchor !== null)
|
|
929
956
|
this.anchorMap.set(anchor, result);
|
|
930
|
-
let ch = this.peek();
|
|
957
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
931
958
|
while (ch !== 0) {
|
|
932
|
-
const following = this.peek(1);
|
|
959
|
+
const following = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(1);
|
|
933
960
|
line = this.line; // Save the current line.
|
|
934
|
-
pos = this.position;
|
|
961
|
+
pos = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
935
962
|
//
|
|
936
963
|
// Explicit notation case. There are two separate blocks:
|
|
937
964
|
// first for the key (denoted by "?") and second for the value (denoted by ":")
|
|
@@ -956,7 +983,7 @@ class LoaderState {
|
|
|
956
983
|
else {
|
|
957
984
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block as explicit mapping pair is incomplete: a key node is missed or followed by a non-tabulated empty line");
|
|
958
985
|
}
|
|
959
|
-
this
|
|
986
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
960
987
|
ch = following;
|
|
961
988
|
//
|
|
962
989
|
// Implicit notation case. Flow-style node as the key first, then ":", and the value.
|
|
@@ -972,11 +999,12 @@ class LoaderState {
|
|
|
972
999
|
if (!newState)
|
|
973
1000
|
break; // Reading is done. Go to the epilogue.
|
|
974
1001
|
if (this.line === line) {
|
|
975
|
-
ch = this.peek();
|
|
1002
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
976
1003
|
this.skipWhitespaces();
|
|
977
|
-
ch = this.peek();
|
|
1004
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
978
1005
|
if (ch === _chars_js_1.COLON) {
|
|
979
|
-
|
|
1006
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1007
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
980
1008
|
if (!(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
981
1009
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: a whitespace character is expected after the key-value separator within a block mapping");
|
|
982
1010
|
}
|
|
@@ -1031,7 +1059,7 @@ class LoaderState {
|
|
|
1031
1059
|
keyTag = keyNode = valueNode = null;
|
|
1032
1060
|
}
|
|
1033
1061
|
this.skipSeparationSpace(true, -1);
|
|
1034
|
-
ch = this.peek();
|
|
1062
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1035
1063
|
}
|
|
1036
1064
|
if (this.lineIndent > nodeIndent && ch !== 0) {
|
|
1037
1065
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: bad indentation of a mapping entry");
|
|
@@ -1056,33 +1084,38 @@ class LoaderState {
|
|
|
1056
1084
|
let isNamed = false;
|
|
1057
1085
|
let tagHandle = "";
|
|
1058
1086
|
let tagName;
|
|
1059
|
-
let ch = this.peek();
|
|
1087
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1060
1088
|
if (ch !== _chars_js_1.EXCLAMATION)
|
|
1061
1089
|
return;
|
|
1062
1090
|
if (tag !== null) {
|
|
1063
1091
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: duplication of a tag property");
|
|
1064
1092
|
}
|
|
1065
|
-
|
|
1093
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1094
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1066
1095
|
if (ch === _chars_js_1.SMALLER_THAN) {
|
|
1067
1096
|
isVerbatim = true;
|
|
1068
|
-
|
|
1097
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1098
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1069
1099
|
}
|
|
1070
1100
|
else if (ch === _chars_js_1.EXCLAMATION) {
|
|
1071
1101
|
isNamed = true;
|
|
1072
1102
|
tagHandle = "!!";
|
|
1073
|
-
|
|
1103
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1104
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1074
1105
|
}
|
|
1075
1106
|
else {
|
|
1076
1107
|
tagHandle = "!";
|
|
1077
1108
|
}
|
|
1078
|
-
let position = this.position;
|
|
1109
|
+
let position = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
1079
1110
|
if (isVerbatim) {
|
|
1080
1111
|
do {
|
|
1081
|
-
|
|
1112
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1113
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1082
1114
|
} while (ch !== 0 && ch !== _chars_js_1.GREATER_THAN);
|
|
1083
|
-
if (this
|
|
1084
|
-
tagName = this.
|
|
1085
|
-
|
|
1115
|
+
if (!__classPrivateFieldGet(this, _LoaderState_scanner, "f").eof()) {
|
|
1116
|
+
tagName = __classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(position, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position);
|
|
1117
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1118
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1086
1119
|
}
|
|
1087
1120
|
else {
|
|
1088
1121
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: unexpected end of stream");
|
|
@@ -1092,20 +1125,21 @@ class LoaderState {
|
|
|
1092
1125
|
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
1093
1126
|
if (ch === _chars_js_1.EXCLAMATION) {
|
|
1094
1127
|
if (!isNamed) {
|
|
1095
|
-
tagHandle = this.
|
|
1128
|
+
tagHandle = __classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(position - 1, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position + 1);
|
|
1096
1129
|
if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
|
|
1097
1130
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: named tag handle contains invalid characters");
|
|
1098
1131
|
}
|
|
1099
1132
|
isNamed = true;
|
|
1100
|
-
position = this.position + 1;
|
|
1133
|
+
position = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position + 1;
|
|
1101
1134
|
}
|
|
1102
1135
|
else {
|
|
1103
1136
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: tag suffix cannot contain an exclamation mark");
|
|
1104
1137
|
}
|
|
1105
1138
|
}
|
|
1106
|
-
|
|
1139
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1140
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1107
1141
|
}
|
|
1108
|
-
tagName = this.
|
|
1142
|
+
tagName = __classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(position, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position);
|
|
1109
1143
|
if (PATTERN_FLOW_INDICATORS.test(tagName)) {
|
|
1110
1144
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: tag suffix cannot contain flow indicator characters");
|
|
1111
1145
|
}
|
|
@@ -1128,34 +1162,38 @@ class LoaderState {
|
|
|
1128
1162
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read tag property: undeclared tag handle "${tagHandle}"`);
|
|
1129
1163
|
}
|
|
1130
1164
|
readAnchorProperty(anchor) {
|
|
1131
|
-
let ch = this.peek();
|
|
1165
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1132
1166
|
if (ch !== _chars_js_1.AMPERSAND)
|
|
1133
1167
|
return;
|
|
1134
1168
|
if (anchor !== null) {
|
|
1135
1169
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read anchor property: duplicate anchor property");
|
|
1136
1170
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1171
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1172
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1173
|
+
const position = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
1139
1174
|
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch) && !(0, _chars_js_1.isFlowIndicator)(ch)) {
|
|
1140
|
-
|
|
1175
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1176
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1141
1177
|
}
|
|
1142
|
-
if (this.position === position) {
|
|
1178
|
+
if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").position === position) {
|
|
1143
1179
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read anchor property: name of an anchor node must contain at least one character");
|
|
1144
1180
|
}
|
|
1145
|
-
return this.
|
|
1181
|
+
return __classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(position, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position);
|
|
1146
1182
|
}
|
|
1147
1183
|
readAlias() {
|
|
1148
|
-
if (this.peek() !== _chars_js_1.ASTERISK)
|
|
1184
|
+
if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").peek() !== _chars_js_1.ASTERISK)
|
|
1149
1185
|
return;
|
|
1150
|
-
|
|
1151
|
-
|
|
1186
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1187
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1188
|
+
const position = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
1152
1189
|
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch) && !(0, _chars_js_1.isFlowIndicator)(ch)) {
|
|
1153
|
-
|
|
1190
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1191
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1154
1192
|
}
|
|
1155
|
-
if (this.position === position) {
|
|
1193
|
+
if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").position === position) {
|
|
1156
1194
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read alias: alias name must contain at least one character");
|
|
1157
1195
|
}
|
|
1158
|
-
const alias = this.
|
|
1196
|
+
const alias = __classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(position, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position);
|
|
1159
1197
|
if (!this.anchorMap.has(alias)) {
|
|
1160
1198
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read alias: unidentified alias "${alias}"`);
|
|
1161
1199
|
}
|
|
@@ -1251,7 +1289,7 @@ class LoaderState {
|
|
|
1251
1289
|
CONTEXT_FLOW_OUT === nodeContext;
|
|
1252
1290
|
const flowIndent = cond ? parentIndent : parentIndent + 1;
|
|
1253
1291
|
if (allowBlockCollections) {
|
|
1254
|
-
const blockIndent = this.position - this.lineStart;
|
|
1292
|
+
const blockIndent = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position - this.lineStart;
|
|
1255
1293
|
const blockSequenceState = this.readBlockSequence(tag, anchor, blockIndent);
|
|
1256
1294
|
if (blockSequenceState)
|
|
1257
1295
|
return this.resolveTag(blockSequenceState);
|
|
@@ -1291,7 +1329,7 @@ class LoaderState {
|
|
|
1291
1329
|
allowBlockCollections) {
|
|
1292
1330
|
// Special case: block sequences are allowed to have same indentation level as the parent.
|
|
1293
1331
|
// http://www.yaml.org/spec/1.2/spec.html#id2799784
|
|
1294
|
-
const blockIndent = this.position - this.lineStart;
|
|
1332
|
+
const blockIndent = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position - this.lineStart;
|
|
1295
1333
|
const newState = this.readBlockSequence(tag, anchor, blockIndent);
|
|
1296
1334
|
if (newState)
|
|
1297
1335
|
return this.resolveTag(newState);
|
|
@@ -1303,20 +1341,22 @@ class LoaderState {
|
|
|
1303
1341
|
readDirectives() {
|
|
1304
1342
|
let hasDirectives = false;
|
|
1305
1343
|
let version = null;
|
|
1306
|
-
let ch = this.peek();
|
|
1344
|
+
let ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1307
1345
|
while (ch !== 0) {
|
|
1308
1346
|
this.skipSeparationSpace(true, -1);
|
|
1309
|
-
ch = this.peek();
|
|
1347
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1310
1348
|
if (this.lineIndent > 0 || ch !== _chars_js_1.PERCENT) {
|
|
1311
1349
|
break;
|
|
1312
1350
|
}
|
|
1313
1351
|
hasDirectives = true;
|
|
1314
|
-
|
|
1315
|
-
|
|
1352
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1353
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1354
|
+
let position = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
1316
1355
|
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
1317
|
-
|
|
1356
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1357
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1318
1358
|
}
|
|
1319
|
-
const directiveName = this.
|
|
1359
|
+
const directiveName = __classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(position, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position);
|
|
1320
1360
|
const directiveArgs = [];
|
|
1321
1361
|
if (directiveName.length < 1) {
|
|
1322
1362
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: directive name length must be greater than zero");
|
|
@@ -1324,14 +1364,15 @@ class LoaderState {
|
|
|
1324
1364
|
while (ch !== 0) {
|
|
1325
1365
|
this.skipWhitespaces();
|
|
1326
1366
|
this.skipComment();
|
|
1327
|
-
ch = this.peek();
|
|
1367
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1328
1368
|
if ((0, _chars_js_1.isEOL)(ch))
|
|
1329
1369
|
break;
|
|
1330
|
-
position = this.position;
|
|
1370
|
+
position = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
1331
1371
|
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
1332
|
-
|
|
1372
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").next();
|
|
1373
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1333
1374
|
}
|
|
1334
|
-
directiveArgs.push(this.
|
|
1375
|
+
directiveArgs.push(__classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(position, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position));
|
|
1335
1376
|
}
|
|
1336
1377
|
if (ch !== 0)
|
|
1337
1378
|
this.readLineBreak();
|
|
@@ -1349,12 +1390,12 @@ class LoaderState {
|
|
|
1349
1390
|
this.dispatchWarning(`unknown document directive "${directiveName}"`);
|
|
1350
1391
|
break;
|
|
1351
1392
|
}
|
|
1352
|
-
ch = this.peek();
|
|
1393
|
+
ch = __classPrivateFieldGet(this, _LoaderState_scanner, "f").peek();
|
|
1353
1394
|
}
|
|
1354
1395
|
return hasDirectives;
|
|
1355
1396
|
}
|
|
1356
1397
|
readDocument() {
|
|
1357
|
-
const documentStart = this.position;
|
|
1398
|
+
const documentStart = __classPrivateFieldGet(this, _LoaderState_scanner, "f").position;
|
|
1358
1399
|
this.checkLineBreaks = false;
|
|
1359
1400
|
this.tagMap = new Map();
|
|
1360
1401
|
this.anchorMap = new Map();
|
|
@@ -1362,10 +1403,10 @@ class LoaderState {
|
|
|
1362
1403
|
this.skipSeparationSpace(true, -1);
|
|
1363
1404
|
let result = null;
|
|
1364
1405
|
if (this.lineIndent === 0 &&
|
|
1365
|
-
this.peek() === _chars_js_1.MINUS &&
|
|
1366
|
-
this.peek(1) === _chars_js_1.MINUS &&
|
|
1367
|
-
this.peek(2) === _chars_js_1.MINUS) {
|
|
1368
|
-
this.position += 3;
|
|
1406
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").peek() === _chars_js_1.MINUS &&
|
|
1407
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(1) === _chars_js_1.MINUS &&
|
|
1408
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").peek(2) === _chars_js_1.MINUS) {
|
|
1409
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").position += 3;
|
|
1369
1410
|
this.skipSeparationSpace(true, -1);
|
|
1370
1411
|
}
|
|
1371
1412
|
else if (hasDirectives) {
|
|
@@ -1381,28 +1422,28 @@ class LoaderState {
|
|
|
1381
1422
|
result = newState.result;
|
|
1382
1423
|
this.skipSeparationSpace(true, -1);
|
|
1383
1424
|
if (this.checkLineBreaks &&
|
|
1384
|
-
PATTERN_NON_ASCII_LINE_BREAKS.test(this.
|
|
1425
|
+
PATTERN_NON_ASCII_LINE_BREAKS.test(__classPrivateFieldGet(this, _LoaderState_scanner, "f").source.slice(documentStart, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position))) {
|
|
1385
1426
|
this.dispatchWarning("non-ASCII line breaks are interpreted as content");
|
|
1386
1427
|
}
|
|
1387
|
-
if (this.position === this.lineStart && this.testDocumentSeparator()) {
|
|
1388
|
-
if (this.peek() === _chars_js_1.DOT) {
|
|
1389
|
-
this.position += 3;
|
|
1428
|
+
if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").position === this.lineStart && this.testDocumentSeparator()) {
|
|
1429
|
+
if (__classPrivateFieldGet(this, _LoaderState_scanner, "f").peek() === _chars_js_1.DOT) {
|
|
1430
|
+
__classPrivateFieldGet(this, _LoaderState_scanner, "f").position += 3;
|
|
1390
1431
|
this.skipSeparationSpace(true, -1);
|
|
1391
1432
|
}
|
|
1392
1433
|
}
|
|
1393
|
-
else if (this
|
|
1434
|
+
else if (!__classPrivateFieldGet(this, _LoaderState_scanner, "f").eof()) {
|
|
1394
1435
|
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: end of the stream or a document separator is expected");
|
|
1395
1436
|
}
|
|
1396
1437
|
return result;
|
|
1397
1438
|
}
|
|
1398
1439
|
*readDocuments() {
|
|
1399
|
-
while (this
|
|
1440
|
+
while (!__classPrivateFieldGet(this, _LoaderState_scanner, "f").eof()) {
|
|
1400
1441
|
yield this.readDocument();
|
|
1401
1442
|
}
|
|
1402
1443
|
}
|
|
1403
1444
|
}
|
|
1404
1445
|
exports.LoaderState = LoaderState;
|
|
1405
|
-
_LoaderState_instances = new WeakSet(), _LoaderState_createError = function _LoaderState_createError(message) {
|
|
1406
|
-
const mark = markToString(this.
|
|
1446
|
+
_LoaderState_scanner = new WeakMap(), _LoaderState_instances = new WeakSet(), _LoaderState_createError = function _LoaderState_createError(message) {
|
|
1447
|
+
const mark = markToString(__classPrivateFieldGet(this, _LoaderState_scanner, "f").source, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position, this.line, __classPrivateFieldGet(this, _LoaderState_scanner, "f").position - this.lineStart);
|
|
1407
1448
|
return new SyntaxError(`${message} ${mark}`);
|
|
1408
1449
|
};
|