ttsc 0.30.4 → 0.31.1
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/cmd/graphbench/main.go +2 -3
- package/cmd/graphdump/main.go +42 -16
- package/cmd/graphdump/run_declares_the_capability_its_output_carries_test.go +32 -18
- package/cmd/graphdump/run_reports_an_unknown_flag_without_exiting_the_process_test.go +10 -9
- package/cmd/graphdump/run_reports_an_unloadable_project_without_printing_a_dump_test.go +8 -7
- package/cmd/platform/command_operation_families_test.go +192 -0
- package/cmd/platform/main.go +11 -1
- package/cmd/ttsc/api_compile.go +166 -46
- package/cmd/ttsc/api_compile_branches_test.go +97 -10
- package/cmd/ttsc/api_transform.go +134 -46
- package/cmd/ttsc/api_transform_branches_test.go +10 -7
- package/cmd/ttsc/build.go +177 -68
- package/cmd/ttsc/build_branches_test.go +35 -7
- package/cmd/ttsc/cli_command_operation_families_test.go +1287 -0
- package/cmd/ttsc/cli_contract_helpers_test.go +82 -0
- package/cmd/ttsc/compiler_argument_cwd_test.go +57 -0
- package/cmd/ttsc/filter.go +31 -14
- package/cmd/ttsc/filter_resolves_flag_names_case_insensitively_test.go +10 -13
- package/cmd/ttsc/filter_strips_unknown_forwarded_flag_test.go +10 -16
- package/cmd/ttsc/flags_gen.go +2 -2
- package/cmd/ttsc/helpers_test.go +67 -10
- package/cmd/ttsc/main.go +122 -21
- package/cmd/ttsc/main_alias_branches_test.go +35 -9
- package/cmd/ttsc/testdata/cli_operation_families/TestAPITransformEnvelopeCarriesReferenceGraph/ambient.d.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestAPITransformEnvelopeCarriesReferenceGraph/main.ts +2 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestAPITransformEnvelopeCarriesReferenceGraph/mytype.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestAPITransformEnvelopeCarriesReferenceGraph/tsconfig.base.json +3 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestAPITransformEnvelopeCarriesReferenceGraph/tsconfig.json +5 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/index.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/src/decorated/main.ts +10 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/src/decorated/types.ts +3 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/src/helpers.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/src/isolated.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/src/main.ts +7 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/src/nested/model.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPICompileAndTransform/tsconfig.json +14 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPITransformUsesCurrentDirectory/index.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIAPITransformUsesCurrentDirectory/tsconfig.json +7 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildAllowsUnusedTypeParametersOnOverloadSignatures/index.ts +4 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildAllowsUnusedTypeParametersOnOverloadSignatures/tsconfig.json +11 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildBlocksSemanticDiagnostics/index.ts +2 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildBlocksSemanticDiagnostics/tsconfig.json +9 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildBlocksSyntacticDiagnostics/index.ts +2 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildBlocksSyntacticDiagnostics/tsconfig.json +8 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildBlocksUnusedParameters/index.ts +3 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildBlocksUnusedParameters/tsconfig.json +10 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildEmitErrorRejectsManifest/index.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIProjectBuildEmitErrorRejectsManifest/tsconfig.json +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIReportsDiagnosticsWithoutEmit/index.ts +1 -0
- package/cmd/ttsc/testdata/cli_operation_families/TestCLIReportsDiagnosticsWithoutEmit/tsconfig.json +8 -0
- package/cmd/ttsc/testdata/cli_operation_families/shared-value-one/project/emit.json +8 -0
- package/cmd/ttsc/testdata/cli_operation_families/shared-value-one/project/flag-shaped.json +7 -0
- package/cmd/ttsc/testdata/cli_operation_families/shared-value-one/project/index.ts +2 -0
- package/cmd/ttsc/testdata/cli_operation_families/shared-value-one/project/nested/tsconfig.app.json +11 -0
- package/cmd/ttsc/testdata/cli_operation_families/shared-value-one/project/outside.json +8 -0
- package/cmd/ttsc/testdata/cli_operation_families/shared-value-one/project/tsconfig.json +8 -0
- package/cmd/ttscgraph/auxiliary_identity_state_tracks_retargets_not_source_contents_test.go +26 -15
- package/cmd/ttscgraph/disk_realpath_other.go +2 -0
- package/cmd/ttscgraph/dump.go +46 -29
- package/cmd/ttscgraph/prepared_projection.go +61 -0
- package/cmd/ttscgraph/projection_fixture_test.go +96 -0
- package/cmd/ttscgraph/run_dump_claims_artifacts_only_when_it_asked_test.go +30 -5
- package/cmd/ttscgraph/run_dump_declares_the_capability_its_output_carries_test.go +6 -1
- package/cmd/ttscgraph/run_dump_emits_only_checker_verified_member_relations_test.go +12 -5
- package/cmd/ttscgraph/run_dump_prints_the_graph_as_json_test.go +17 -12
- package/cmd/ttscgraph/run_help_version_and_bad_flags_exit_codes_test.go +8 -3
- package/cmd/ttscgraph/serve.go +116 -79
- package/cmd/ttscgraph/serve_adopts_a_republished_artifact_set_test.go +16 -167
- package/cmd/ttscgraph/serve_adopts_a_republished_set_over_the_shard_protocol_test.go +122 -0
- package/cmd/ttscgraph/serve_answers_a_project_that_implements_its_own_ambient_declaration_test.go +35 -7
- package/cmd/ttscgraph/serve_early_error_encode_failure_is_observable_test.go +5 -0
- package/cmd/ttscgraph/serve_error_response_still_names_its_mode_test.go +10 -5
- package/cmd/ttscgraph/serve_git_ignore_projection_test.go +150 -0
- package/cmd/ttscgraph/serve_keeps_a_startup_set_a_client_never_mentions_test.go +69 -0
- package/cmd/ttscgraph/serve_object_members_refresh_without_identity_collisions_test.go +82 -0
- package/cmd/ttscgraph/serve_phase_trace_accounts_for_load_failure_test.go +9 -3
- package/cmd/ttscgraph/serve_phase_trace_is_opt_in_and_payload_free_test.go +12 -6
- package/cmd/ttscgraph/serve_projects_an_artifact_no_source_owns_test.go +13 -16
- package/cmd/ttscgraph/serve_protocol_fails_the_stream_on_an_unaddressable_request_line_test.go +10 -9
- package/cmd/ttscgraph/serve_protocol_negotiates_incremental_shards_test.go +37 -2
- package/cmd/ttscgraph/serve_protocol_retries_session_creation_test.go +7 -2
- package/cmd/ttscgraph/serve_protocol_reuses_session_test.go +13 -3
- package/cmd/ttscgraph/serve_session_applies_source_edit_incrementally_test.go +12 -7
- package/cmd/ttscgraph/serve_session_fails_closed_on_deleted_config_test.go +12 -7
- package/cmd/ttscgraph/serve_session_fails_closed_on_invalid_config_test.go +8 -3
- package/cmd/ttscgraph/serve_session_keeps_base_url_fallback_unchanged_test.go +7 -2
- package/cmd/ttscgraph/serve_session_keeps_change_detection_live_after_initial_dump_error_test.go +66 -0
- package/cmd/ttscgraph/serve_session_keeps_esm_directory_candidate_unchanged_test.go +12 -3
- package/cmd/ttscgraph/serve_session_keeps_exports_blocked_file_candidates_unchanged_test.go +8 -3
- package/cmd/ttscgraph/serve_session_keeps_inactive_conditional_export_unchanged_test.go +12 -3
- package/cmd/ttscgraph/serve_session_keeps_lower_priority_module_candidate_unchanged_test.go +14 -8
- package/cmd/ttscgraph/serve_session_keeps_lower_priority_paths_pattern_unchanged_test.go +12 -3
- package/cmd/ttscgraph/serve_session_keeps_missing_literal_root_unchanged_test.go +7 -2
- package/cmd/ttscgraph/serve_session_keeps_nonlongest_root_dirs_candidate_unchanged_test.go +12 -3
- package/cmd/ttscgraph/serve_session_rebuilds_import_graph_change_test.go +17 -8
- package/cmd/ttscgraph/serve_session_reloads_commonjs_package_entry_for_esm_test.go +11 -2
- package/cmd/ttscgraph/serve_session_reloads_created_literal_root_test.go +7 -2
- package/cmd/ttscgraph/serve_session_reloads_extended_config_change_test.go +9 -4
- package/cmd/ttscgraph/serve_session_reloads_module_suffix_candidate_test.go +13 -4
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_conditional_export_test.go +13 -8
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_config_types_test.go +7 -2
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_excluded_import_test.go +11 -3
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_package_export_test.go +11 -2
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_package_import_test.go +11 -2
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_path_alias_test.go +11 -2
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_reference_path_test.go +11 -2
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_root_dirs_target_test.go +11 -2
- package/cmd/ttscgraph/serve_session_reloads_newly_resolved_type_reference_test.go +11 -2
- package/cmd/ttscgraph/serve_session_reloads_root_file_set_test.go +11 -5
- package/cmd/ttscgraph/serve_session_reloads_source_deleted_during_load_test.go +16 -9
- package/cmd/ttscgraph/serve_session_reloads_superseding_module_candidates_test.go +18 -13
- package/cmd/ttscgraph/serve_session_reloads_transitive_project_reference_test.go +14 -5
- package/cmd/ttscgraph/serve_session_reloads_when_program_plugin_linked_test.go +13 -8
- package/cmd/ttscgraph/serve_session_retries_a_pending_dump_before_unchanged_test.go +62 -0
- package/cmd/ttscgraph/serve_session_reuses_unchanged_preamble_source_test.go +21 -0
- package/cmd/ttscgraph/serve_session_reuses_unchanged_snapshot_test.go +12 -7
- package/cmd/ttscgraph/serve_session_revisits_source_edited_during_load_test.go +18 -8
- package/cmd/ttscgraph/serve_session_tolerates_os_invalid_resolution_candidate_test.go +13 -9
- package/cmd/ttscgraph/serve_session_tracks_all_module_specifier_forms_test.go +12 -3
- package/cmd/ttscgraph/serve_session_tracks_diamond_project_references_once_test.go +12 -8
- package/cmd/ttscgraph/serve_shards.go +356 -279
- package/cmd/ttscgraph/serve_shards_abandoned_generation_converges_on_retry_test.go +41 -16
- package/cmd/ttscgraph/serve_shards_delete_removed_source_test.go +14 -4
- package/cmd/ttscgraph/serve_shards_external_endpoints_test.go +18 -2
- package/cmd/ttscgraph/serve_shards_keep_source_distributed_dependencies_at_the_boundary_test.go +36 -5
- package/cmd/ttscgraph/serve_shards_match_full_dump_oracle_test.go +12 -3
- package/cmd/ttscgraph/serve_shards_merge_pending_and_new_edits_test.go +36 -3
- package/cmd/ttscgraph/serve_shards_prune_unreferenced_external_endpoints_test.go +18 -2
- package/cmd/ttscgraph/serve_shards_publish_created_source_test.go +16 -13
- package/cmd/ttscgraph/serve_shards_rebuild_declaration_edit_test.go +14 -4
- package/cmd/ttscgraph/serve_shards_refresh_cross_file_implementation_test.go +24 -5
- package/cmd/ttscgraph/serve_shards_refresh_dependent_diagnostics_test.go +30 -7
- package/cmd/ttscgraph/serve_shards_rename_moves_source_identity_test.go +14 -11
- package/cmd/ttscgraph/serve_shards_retry_preserves_committed_generation_test.go +17 -7
- package/cmd/ttscgraph/serve_shards_reuse_unaffected_sources_test.go +21 -7
- package/cmd/ttscgraph/serve_snapshot_proves_its_program_without_a_second_read_test.go +57 -16
- package/cmd/ttscgraph/serve_source_encoding_test.go +133 -0
- package/cmd/ttscserver/command_operation_families_test.go +207 -0
- package/cmd/ttscserver/main.go +121 -39
- package/cmd/ttscserver/resolve_launch_uses_native_flag_authority_test.go +147 -0
- package/cmd/ttscserver/run_lsp_forwards_execute_command_advertisement_flags_test.go +7 -0
- package/cmd/ttscserver/run_lsp_prefers_tsgo_flag_test.go +13 -1
- package/cmd/ttscserver/run_lsp_reports_getwd_error_test.go +5 -0
- package/cmd/ttscserver/run_lsp_reports_server_error_test.go +10 -3
- package/cmd/ttscserver/run_lsp_uses_native_plugin_manifest_source_test.go +13 -10
- package/cmd/ttscserver/run_lsp_uses_tsgo_environment_test.go +10 -3
- package/driver/authored_region_maps_positions_around_the_preamble_test.go +95 -0
- package/driver/build_information_uses_selected_output_identity_test.go +148 -0
- package/driver/check_observations.go +67 -0
- package/driver/config_discovery.go +93 -24
- package/driver/declaration_shape.go +9 -0
- package/driver/diagnostics_preamble.go +8 -7
- package/driver/emit_containment.go +29 -8
- package/driver/emit_plugin.go +106 -36
- package/driver/emit_plugin_output.go +26 -2
- package/driver/emit_provenance.go +155 -0
- package/driver/graph.go +54 -20
- package/driver/host.go +26 -3
- package/driver/input_observation.go +78 -16
- package/driver/input_observation_test.go +34 -11
- package/driver/lsp.go +401 -30
- package/driver/overlay.go +69 -2
- package/driver/plugins.go +256 -24
- package/driver/private_result.go +43 -0
- package/driver/program.go +439 -95
- package/driver/resolution_candidates.go +63 -14
- package/driver/resolution_candidates_test.go +28 -0
- package/driver/resolutioninputs/recorder.cjs +1149 -0
- package/driver/resolutioninputs/resolutioninputs.go +37 -0
- package/driver/rewrite.go +373 -420
- package/driver/session.go +80 -12
- package/driver/sourcemap_preamble.go +38 -16
- package/driver/transform_dependencies.go +38 -10
- package/driver/transform_dependencies_declares_every_file_without_a_contributor_test.go +9 -8
- package/driver/transform_dependencies_drops_a_self_reported_dependency_test.go +7 -6
- package/driver/transform_dependencies_keys_a_reported_path_like_the_envelope_test.go +9 -9
- package/driver/transform_dependencies_requires_every_contributor_to_declare_test.go +10 -5
- package/driver/transform_dependencies_stays_silent_for_an_undeclared_contributor_test.go +8 -6
- package/driver/transform_dependencies_withdraws_completeness_after_an_unusable_dependency_test.go +9 -5
- package/driver/transform_source_map.go +388 -0
- package/driver/windowsjunction/create_preserves_existing_directory_windows_test.go +48 -0
- package/driver/windowsjunction/create_treats_paths_as_data_windows_test.go +55 -0
- package/driver/windowsjunction/windowsjunction.go +17 -1
- package/go.mod +10 -10
- package/go.sum +10 -10
- package/internal/cwd/cwd.go +13 -0
- package/internal/e2etrace/artifact.go +147 -0
- package/internal/e2etrace/completion_hints.go +35 -0
- package/internal/e2etrace/completion_hints_test.go +76 -0
- package/internal/e2etrace/e2etrace.go +303 -0
- package/internal/e2etrace/output.go +50 -0
- package/internal/graph/artifacts.go +69 -12
- package/internal/graph/artifacts_index_what_a_plugin_published_test.go +19 -8
- package/internal/graph/artifacts_survive_a_partial_rebuild_test.go +11 -12
- package/internal/graph/assigned_implementations_of_declaration_file_symbols_leave_no_edge_source_test.go +10 -12
- package/internal/graph/assigned_implementations_of_node_modules_symbols_leave_no_edge_source_test.go +7 -1
- package/internal/graph/build.go +122 -38
- package/internal/graph/build_files_reuses_committed_cross_file_endpoints_test.go +9 -3
- package/internal/graph/build_keeps_source_distributed_dependencies_at_the_external_boundary_test.go +10 -1
- package/internal/graph/build_records_a_node_per_top_level_declaration_test.go +10 -4
- package/internal/graph/build_releases_the_scratch_it_no_longer_reads_test.go +22 -15
- package/internal/graph/decorators.go +18 -0
- package/internal/graph/decorators_capture_name_and_literal_arguments_test.go +9 -4
- package/internal/graph/diagnostics.go +21 -8
- package/internal/graph/doc_refs_are_the_use_the_checker_already_counts_test.go +25 -13
- package/internal/graph/doc_refs_resolve_documentation_links_test.go +19 -15
- package/internal/graph/doc_tags.go +28 -19
- package/internal/graph/doc_tags_are_claimed_before_they_are_read_test.go +16 -6
- package/internal/graph/doc_tags_capture_every_unrecognized_tag_test.go +9 -2
- package/internal/graph/doc_tags_read_only_what_the_parser_attached_test.go +12 -8
- package/internal/graph/doc_tags_stop_at_the_external_boundary_test.go +11 -1
- package/internal/graph/doc_tags_survive_line_endings_and_repeated_blocks_test.go +16 -6
- package/internal/graph/dump.go +200 -51
- package/internal/graph/dump_checkout_paths_are_stable_test.go +9 -2
- package/internal/graph/dump_diagnostics_ride_the_generation_that_built_it_test.go +10 -11
- package/internal/graph/dump_evidence_skips_leading_trivia_test.go +8 -2
- package/internal/graph/dump_is_a_function_of_the_source_test.go +12 -13
- package/internal/graph/dump_never_serializes_a_list_as_null_test.go +9 -9
- package/internal/graph/dump_path_mapper_caches_alias_resolution_test.go +10 -2
- package/internal/graph/dump_path_mapper_rejects_unportable_roots_and_collisions_test.go +53 -0
- package/internal/graph/{dump_paths_are_portable_and_injective_test.go → dump_path_mapper_uses_portable_coordinates_test.go} +8 -43
- package/internal/graph/dump_paths.go +61 -25
- package/internal/graph/dump_paths_canonicalize_windows_short_root_test.go +45 -8
- package/internal/graph/dump_rejects_provenance_only_path_errors_test.go +5 -0
- package/internal/graph/dump_serializes_the_full_graph_test.go +13 -19
- package/internal/graph/dump_symlink_project_publishes_matching_base_test.go +8 -0
- package/internal/graph/dump_uses_ecma_line_terminators_test.go +12 -6
- package/internal/graph/duplicate_variable_object_members_keep_first_declaration_test.go +11 -8
- package/internal/graph/edge_spans_point_to_resolved_usage_test.go +13 -5
- package/internal/graph/edges.go +44 -47
- package/internal/graph/edges_cover_class_level_references_test.go +14 -11
- package/internal/graph/enum_initializer_calls_are_edges_test.go +13 -3
- package/internal/graph/enum_members_carry_their_names_on_the_enum_node_test.go +19 -26
- package/internal/graph/exports.go +3 -5
- package/internal/graph/file_diagnostics_match_tsgo_code_and_location_test.go +9 -4
- package/internal/graph/file_diagnostics_report_code_column_and_message_test.go +11 -5
- package/internal/graph/function_locals_do_not_collide_test.go +27 -7
- package/internal/graph/gitignore.go +25 -12
- package/internal/graph/graph.go +167 -52
- package/internal/graph/heritage_edges_cover_implements_and_interface_extends_test.go +11 -3
- package/internal/graph/heritage_edges_keep_extends_and_implements_to_same_base_test.go +6 -0
- package/internal/graph/heritage_edges_record_extends_versus_implements_origin_test.go +9 -3
- package/internal/graph/heritage_edges_traverse_barrels_and_stop_at_external_leaves_test.go +11 -4
- package/internal/graph/line_model.go +44 -25
- package/internal/graph/literals.go +6 -7
- package/internal/graph/literals_are_absent_when_the_type_admits_more_than_it_can_name_test.go +10 -5
- package/internal/graph/literals_cover_enum_members_the_graph_has_no_nodes_for_test.go +15 -17
- package/internal/graph/literals_do_not_depend_on_declaration_line_wrapping_test.go +10 -9
- package/internal/graph/literals_render_every_value_in_typescript_source_form_test.go +11 -11
- package/internal/graph/literals_resolve_through_alias_indirection_test.go +11 -11
- package/internal/graph/member_relation_edges_follow_checker_validity_test.go +11 -2
- package/internal/graph/member_relation_edges_preserve_checker_boundaries_test.go +11 -1
- package/internal/graph/member_relation_edges_reject_checker_invalid_pairs_test.go +12 -7
- package/internal/graph/namespace_dotted_form_qualifies_deeply_test.go +12 -3
- package/internal/graph/namespace_members_become_qualified_nodes_and_edges_test.go +12 -2
- package/internal/graph/node_identity_is_position_invariant_test.go +8 -2
- package/internal/graph/node_ids_preserve_hash_bearing_components_test.go +10 -2
- package/internal/graph/node_modifiers_emit_union_strings_test.go +13 -12
- package/internal/graph/nodes_are_marked_exported_through_the_export_table_test.go +12 -14
- package/internal/graph/object_literal_declarations_resolve_calls_test.go +170 -0
- package/internal/graph/object_literal_members_ride_on_the_snapshot_test.go +14 -13
- package/internal/graph/object_member_signatures_preserve_literal_whitespace_test.go +11 -7
- package/internal/graph/object_members.go +100 -1
- package/internal/graph/overload_implementation_replaces_signature_test.go +13 -2
- package/internal/graph/property_member_edges_remain_owner_visible_test.go +9 -3
- package/internal/graph/provenance.go +172 -87
- package/internal/graph/resolve.go +46 -12
- package/internal/graph/resolve_prefers_implementation_declaration_test.go +10 -2
- package/internal/graph/resolve_unwraps_barrel_reexport_to_real_declaration_test.go +16 -20
- package/internal/graph/source.go +16 -6
- package/internal/graph/source_texts_cover_every_resident_program_source_test.go +11 -7
- package/internal/graph/type_ref_edges_cover_typeof_as_satisfies_test.go +21 -2
- package/internal/graph/type_ref_edges_resolve_named_types_across_files_test.go +8 -3
- package/internal/graph/value_access_edges_cover_properties_test.go +11 -3
- package/internal/graph/value_call_edges_attribute_function_assignments_to_members_test.go +10 -4
- package/internal/graph/value_call_edges_cover_jsx_components_test.go +12 -8
- package/internal/graph/value_call_edges_cover_methods_and_constructors_test.go +12 -9
- package/internal/graph/value_call_edges_cover_variable_bound_callables_test.go +9 -3
- package/internal/graph/value_call_edges_do_not_double_record_invoked_member_access_test.go +10 -3
- package/internal/graph/value_call_edges_record_construct_versus_call_origin_test.go +12 -9
- package/internal/graph/value_call_edges_resolve_across_files_and_dedupe_test.go +10 -3
- package/internal/graph/value_call_edges_skip_self_and_unresolved_test.go +16 -5
- package/internal/graph/wire_node_ids_share_alias_resolution_test.go +10 -4
- package/internal/graphsymbols/position_helpers_follow_ecma_line_terminators_test.go +16 -4
- package/internal/graphsymbols/provider.go +278 -113
- package/internal/lspserver/lsp_clean_didopen_refreshes_compiler_state_test.go +14 -12
- package/internal/lspserver/lsp_completion_gate_never_refuses_a_matching_line_test.go +7 -1
- package/internal/lspserver/lsp_completion_hints_longest_trigger_wins_test.go +30 -5
- package/internal/lspserver/lsp_completion_hints_nearest_trigger_wins_test.go +5 -0
- package/internal/lspserver/lsp_completion_merges_into_upstream_response_test.go +23 -10
- package/internal/lspserver/lsp_completion_nearest_hint_replaces_nearest_filter_test.go +7 -1
- package/internal/lspserver/lsp_completion_preserves_completion_list_extensions_test.go +13 -5
- package/internal/lspserver/lsp_completion_refuses_hints_inside_a_string_literal_test.go +11 -7
- package/internal/lspserver/lsp_completion_replaces_full_filter_in_rank_order_test.go +12 -2
- package/internal/lspserver/lsp_completion_request.go +5 -26
- package/internal/lspserver/lsp_completion_scope.go +13 -10
- package/internal/lspserver/lsp_completion_scope_bench_test.go +11 -5
- package/internal/lspserver/lsp_completion_scope_classifies_regex_statement_and_operator_boundaries_test.go +8 -1
- package/internal/lspserver/lsp_completion_scope_ignores_jsdoc_bytes_in_literals_test.go +11 -10
- package/internal/lspserver/lsp_completion_scope_refuses_regex_hints_test.go +7 -3
- package/internal/lspserver/lsp_completion_trigger_uses_last_rune_test.go +6 -0
- package/internal/lspserver/lsp_deleted_watched_file_withdraws_plugin_diagnostics_test.go +11 -10
- package/internal/lspserver/lsp_didsave_keeps_the_incremental_changed_uri_path_test.go +12 -9
- package/internal/lspserver/lsp_document_diagnostics_omits_cached_project_when_current_result_has_none_test.go +17 -5
- package/internal/lspserver/lsp_envelope.go +84 -11
- package/internal/lspserver/lsp_executable_project_input_change_requests_launcher_restart_test.go +12 -9
- package/internal/lspserver/lsp_external_watched_change_retains_program_test.go +8 -2
- package/internal/lspserver/lsp_frame.go +42 -10
- package/internal/lspserver/lsp_hints_absence_is_not_an_error_test.go +16 -15
- package/internal/lspserver/lsp_hints_refresh_coalesces_concurrent_requests_test.go +21 -12
- package/internal/lspserver/lsp_hints_refresh_ignores_a_superseded_generation_test.go +20 -12
- package/internal/lspserver/lsp_hints_refresh_keeps_each_producer_isolated_test.go +30 -9
- package/internal/lspserver/lsp_hints_refresh_replaces_the_session_snapshot_test.go +25 -18
- package/internal/lspserver/lsp_hints_refresh_scheduled_by_editor_events_test.go +12 -12
- package/internal/lspserver/lsp_hints_refresh_serves_completion_while_running_test.go +21 -8
- package/internal/lspserver/lsp_index_byte_from_bounds_its_search_start_test.go +9 -7
- package/internal/lspserver/lsp_initialize_constrains_position_encoding_to_utf16_test.go +57 -21
- package/internal/lspserver/lsp_late_completion_trigger_is_reported_once_test.go +16 -17
- package/internal/lspserver/lsp_native_completion_hints_decode_flat_lint_wire_test.go +8 -2
- package/internal/lspserver/lsp_native_completion_hints_grouped_compatibility_boundary_test.go +5 -0
- package/internal/lspserver/lsp_native_plugin_source.go +381 -202
- package/internal/lspserver/lsp_native_plugin_source_ends_the_session_on_a_selection_input_test.go +234 -0
- package/internal/lspserver/lsp_native_reply_policies_test.go +475 -0
- package/internal/lspserver/lsp_native_reply_policy.go +232 -0
- package/internal/lspserver/lsp_native_resident.go +171 -57
- package/internal/lspserver/lsp_plugin.go +372 -68
- package/internal/lspserver/lsp_plugin_completion_resolve_stays_local_test.go +13 -4
- package/internal/lspserver/lsp_plugin_selection_inputs.go +283 -0
- package/internal/lspserver/lsp_plugin_selection_inputs_follow_directory_case_semantics_windows_test.go +81 -0
- package/internal/lspserver/lsp_position_conversions_span_astral_and_combining_runes_test.go +33 -11
- package/internal/lspserver/lsp_project_context_transport_identity_test.go +14 -2
- package/internal/lspserver/lsp_project_diagnostics.go +25 -4
- package/internal/lspserver/lsp_project_diagnostics_capability_is_independent_test.go +13 -2
- package/internal/lspserver/lsp_project_diagnostics_program_input_overlap_refreshes_all_producers_test.go +14 -4
- package/internal/lspserver/lsp_project_diagnostics_refresh_accumulates_owner_freshness_test.go +8 -2
- package/internal/lspserver/lsp_project_diagnostics_refresh_keeps_each_producer_last_good_test.go +10 -5
- package/internal/lspserver/lsp_project_diagnostics_refreshes_only_input_owners_test.go +14 -2
- package/internal/lspserver/lsp_project_diagnostics_resume_preserves_generation_test.go +8 -2
- package/internal/lspserver/lsp_project_diagnostics_translates_relative_client_project_test.go +15 -11
- package/internal/lspserver/lsp_project_input_ownership_resolves_declared_spellings_test.go +17 -8
- package/internal/lspserver/lsp_project_input_path_key_windows.go +16 -16
- package/internal/lspserver/lsp_project_input_path_key_windows_test.go +34 -18
- package/internal/lspserver/lsp_project_input_registration.go +5 -1
- package/internal/lspserver/lsp_project_input_registration_rechecks_selection_baseline_test.go +10 -4
- package/internal/lspserver/lsp_project_input_registration_reconciles_rejected_pending_request_test.go +5 -0
- package/internal/lspserver/lsp_project_input_registration_shapes_patterns_test.go +9 -3
- package/internal/lspserver/lsp_project_input_watchers_anchor_missing_paths_test.go +8 -3
- package/internal/lspserver/lsp_project_inputs.go +203 -59
- package/internal/lspserver/lsp_project_inputs_match_missing_exact_and_glob_test.go +10 -6
- package/internal/lspserver/lsp_project_inputs_reject_invalid_and_foreign_snapshots_test.go +25 -2
- package/internal/lspserver/lsp_proxy.go +239 -80
- package/internal/lspserver/lsp_refresh.go +16 -1
- package/internal/lspserver/lsp_reload_directories_compare_immediate_topology_test.go +66 -19
- package/internal/lspserver/lsp_reload_directories_separate_glob_territory_test.go +26 -6
- package/internal/lspserver/lsp_reload_file_fingerprint_preserves_raw_symlink_target_test.go +12 -6
- package/internal/lspserver/lsp_reload_fingerprints_read_a_junction_as_a_link_test.go +76 -0
- package/internal/lspserver/lsp_resident_falls_back_when_serve_unsupported_test.go +20 -13
- package/internal/lspserver/lsp_resident_invalidation_broadcasts_program_input_overlap_test.go +9 -4
- package/internal/lspserver/lsp_resident_invalidation_targets_project_input_owners_test.go +6 -1
- package/internal/lspserver/lsp_resident_maps_verb_args_test.go +5 -0
- package/internal/lspserver/lsp_same_transport_entries_are_deduplicated_test.go +10 -1
- package/internal/lspserver/lsp_server.go +124 -21
- package/internal/lspserver/lsp_symbols.go +92 -13
- package/internal/lspserver/lsp_watched_file_changes_reach_compiler_caches_test.go +11 -10
- package/internal/sourceprocess/complete_group.go +70 -0
- package/internal/sourceprocess/complete_group_preserves_original_wait_and_requires_independent_absence_test.go +145 -0
- package/internal/sourceprocess/contain_unix.go +143 -0
- package/internal/sourceprocess/contain_windows.go +439 -0
- package/internal/sourceprocess/darwin_group_retirement_preserves_phase_evidence_test.go +287 -0
- package/internal/sourceprocess/observe_exit_darwin.go +57 -0
- package/internal/sourceprocess/observe_exit_linux.go +27 -0
- package/internal/sourceprocess/observe_exit_other.go +11 -0
- package/internal/sourceprocess/reap_linux.go +31 -0
- package/internal/sourceprocess/reap_other.go +10 -0
- package/internal/sourceprocess/request_preserves_native_command_inputs_test.go +86 -0
- package/internal/sourceprocess/run.go +216 -0
- package/internal/sourceprocess/started_windows.go +41 -0
- package/internal/sourceprocess/target_windows.go +211 -0
- package/internal/sourceprocess/windows_job_accounting_rejects_invalid_boundary_test.go +97 -0
- package/internal/sourceprocess/windows_started_publication_distinguishes_pending_from_refusal_test.go +76 -0
- package/internal/sourceprocess/windows_target_owns_suspended_admission_test.go +179 -0
- package/internal/watchhelper/run.go +42 -0
- package/internal/watchhelper/run_linux.go +323 -0
- package/internal/watchhelper/run_linux_test.go +418 -0
- package/internal/watchhelper/run_other.go +16 -0
- package/internal/watchhelper/run_windows.go +471 -0
- package/internal/watchhelper/watchhelper.go +106 -0
- package/internal/watchhelper/windows_notifications_preserve_mutations_without_access_noise_test.go +506 -0
- package/lib/TtscCompiler.d.ts +118 -21
- package/lib/TtscCompiler.js +175 -179
- package/lib/TtscCompiler.js.map +1 -1
- package/lib/TtscService.d.ts +66 -18
- package/lib/TtscService.js +81 -24
- package/lib/TtscService.js.map +1 -1
- package/lib/TtscServiceRequestOptions.d.ts +21 -0
- package/lib/TtscServiceRequestOptions.js +3 -0
- package/lib/TtscServiceRequestOptions.js.map +1 -0
- package/lib/compiler/internal/CapturedProcessOutput.d.ts +61 -0
- package/lib/compiler/internal/CapturedProcessOutput.js +3 -0
- package/lib/compiler/internal/CapturedProcessOutput.js.map +1 -0
- package/lib/compiler/internal/CompilerArgumentsInspection.d.ts +53 -0
- package/lib/compiler/internal/CompilerArgumentsInspection.js +173 -0
- package/lib/compiler/internal/CompilerArgumentsInspection.js.map +1 -0
- package/lib/compiler/internal/EmitOwnershipIndex.d.ts +92 -0
- package/lib/compiler/internal/EmitOwnershipIndex.js +215 -0
- package/lib/compiler/internal/EmitOwnershipIndex.js.map +1 -0
- package/lib/compiler/internal/PrivateCompilerOutput.d.ts +67 -0
- package/lib/compiler/internal/PrivateCompilerOutput.js +245 -0
- package/lib/compiler/internal/PrivateCompilerOutput.js.map +1 -0
- package/lib/compiler/internal/ResidentCheckProcess.d.ts +127 -0
- package/lib/compiler/internal/ResidentCheckProcess.js +403 -0
- package/lib/compiler/internal/ResidentCheckProcess.js.map +1 -0
- package/lib/compiler/internal/ResidentCheckProcessOptions.d.ts +29 -0
- package/lib/compiler/internal/ResidentCheckProcessOptions.js +3 -0
- package/lib/compiler/internal/ResidentCheckProcessOptions.js.map +1 -0
- package/lib/compiler/internal/ResidentCheckRequest.d.ts +37 -0
- package/lib/compiler/internal/ResidentCheckRequest.js +3 -0
- package/lib/compiler/internal/ResidentCheckRequest.js.map +1 -0
- package/lib/compiler/internal/ResidentCheckResult.d.ts +23 -0
- package/lib/compiler/internal/ResidentCheckResult.js +3 -0
- package/lib/compiler/internal/ResidentCheckResult.js.map +1 -0
- package/lib/compiler/internal/ResidentCheckTelemetry.d.ts +33 -0
- package/lib/compiler/internal/ResidentCheckTelemetry.js +3 -0
- package/lib/compiler/internal/ResidentCheckTelemetry.js.map +1 -0
- package/lib/compiler/internal/ResidentReplyKind.d.ts +18 -0
- package/lib/compiler/internal/ResidentReplyKind.js +3 -0
- package/lib/compiler/internal/ResidentReplyKind.js.map +1 -0
- package/lib/compiler/internal/ResidentTransformProcess.d.ts +83 -0
- package/lib/compiler/internal/ResidentTransformProcess.js +261 -0
- package/lib/compiler/internal/ResidentTransformProcess.js.map +1 -0
- package/lib/compiler/internal/ResidentTransformProcessOptions.d.ts +27 -0
- package/lib/compiler/internal/ResidentTransformProcessOptions.js +3 -0
- package/lib/compiler/internal/ResidentTransformProcessOptions.js.map +1 -0
- package/lib/compiler/internal/ResidentTransformReply.d.ts +51 -0
- package/lib/compiler/internal/ResidentTransformReply.js +79 -0
- package/lib/compiler/internal/ResidentTransformReply.js.map +1 -0
- package/lib/compiler/internal/ResidentTransformRequestOptions.d.ts +16 -0
- package/lib/compiler/internal/ResidentTransformRequestOptions.js +3 -0
- package/lib/compiler/internal/ResidentTransformRequestOptions.js.map +1 -0
- package/lib/compiler/internal/ResidentTransformRequests.d.ts +102 -0
- package/lib/compiler/internal/ResidentTransformRequests.js +172 -0
- package/lib/compiler/internal/ResidentTransformRequests.js.map +1 -0
- package/lib/compiler/internal/StartedResidentTransform.d.ts +27 -0
- package/lib/compiler/internal/StartedResidentTransform.js +3 -0
- package/lib/compiler/internal/StartedResidentTransform.js.map +1 -0
- package/lib/compiler/internal/TransformProjectWorkerReply.d.ts +34 -0
- package/lib/compiler/internal/TransformProjectWorkerReply.js +3 -0
- package/lib/compiler/internal/TransformProjectWorkerReply.js.map +1 -0
- package/lib/compiler/internal/TransformProjectWorkerRequest.d.ts +39 -0
- package/lib/compiler/internal/TransformProjectWorkerRequest.js +3 -0
- package/lib/compiler/internal/TransformProjectWorkerRequest.js.map +1 -0
- package/lib/compiler/internal/build/BuildExecution.d.ts +359 -0
- package/lib/compiler/internal/build/BuildExecution.js +977 -0
- package/lib/compiler/internal/build/BuildExecution.js.map +1 -0
- package/lib/compiler/internal/build/BuildTiming.d.ts +99 -0
- package/lib/compiler/internal/build/BuildTiming.js +113 -0
- package/lib/compiler/internal/build/BuildTiming.js.map +1 -0
- package/lib/compiler/internal/build/CompilerDiagnostics.d.ts +82 -0
- package/lib/compiler/internal/build/CompilerDiagnostics.js +270 -0
- package/lib/compiler/internal/build/CompilerDiagnostics.js.map +1 -0
- package/lib/compiler/internal/build/NativePluginArguments.d.ts +114 -0
- package/lib/compiler/internal/build/NativePluginArguments.js +255 -0
- package/lib/compiler/internal/build/NativePluginArguments.js.map +1 -0
- package/lib/compiler/internal/build/PassthroughFlags.d.ts +137 -0
- package/lib/compiler/internal/build/PassthroughFlags.js +213 -0
- package/lib/compiler/internal/build/PassthroughFlags.js.map +1 -0
- package/lib/compiler/internal/build/PluginFailureDiagnostics.d.ts +48 -0
- package/lib/compiler/internal/build/PluginFailureDiagnostics.js +68 -0
- package/lib/compiler/internal/build/PluginFailureDiagnostics.js.map +1 -0
- package/lib/compiler/internal/build/ResidentCheckEntryPlan.d.ts +38 -0
- package/lib/compiler/internal/build/ResidentCheckEntryPlan.js +3 -0
- package/lib/compiler/internal/build/ResidentCheckEntryPlan.js.map +1 -0
- package/lib/compiler/internal/build/ResidentCheckWatchChange.d.ts +30 -0
- package/lib/compiler/internal/build/ResidentCheckWatchChange.js +3 -0
- package/lib/compiler/internal/build/ResidentCheckWatchChange.js.map +1 -0
- package/lib/compiler/internal/build/ResidentCheckWatchSession.d.ts +113 -0
- package/lib/compiler/internal/build/ResidentCheckWatchSession.js +378 -0
- package/lib/compiler/internal/build/ResidentCheckWatchSession.js.map +1 -0
- package/lib/compiler/internal/build/RunBuildOptions.d.ts +130 -0
- package/lib/compiler/internal/build/RunBuildOptions.js +3 -0
- package/lib/compiler/internal/build/RunBuildOptions.js.map +1 -0
- package/lib/compiler/internal/build/TsgoArguments.d.ts +168 -0
- package/lib/compiler/internal/build/TsgoArguments.js +324 -0
- package/lib/compiler/internal/build/TsgoArguments.js.map +1 -0
- package/lib/compiler/internal/build/appendBuildOutput.d.ts +41 -0
- package/lib/compiler/internal/build/appendBuildOutput.js +182 -0
- package/lib/compiler/internal/build/appendBuildOutput.js.map +1 -0
- package/lib/compiler/internal/build/bufferResidentCheckEntryRequests.d.ts +20 -0
- package/lib/compiler/internal/build/bufferResidentCheckEntryRequests.js +40 -0
- package/lib/compiler/internal/build/bufferResidentCheckEntryRequests.js.map +1 -0
- package/lib/compiler/internal/build/createProcessDiagnostic.d.ts +19 -0
- package/lib/compiler/internal/build/createProcessDiagnostic.js +30 -0
- package/lib/compiler/internal/build/createProcessDiagnostic.js.map +1 -0
- package/lib/compiler/internal/build/isAbsoluteLocalProjectInputPath.d.ts +22 -0
- package/lib/compiler/internal/build/isAbsoluteLocalProjectInputPath.js +59 -0
- package/lib/compiler/internal/build/isAbsoluteLocalProjectInputPath.js.map +1 -0
- package/lib/compiler/internal/build/mergeProjectInputSnapshots.d.ts +28 -0
- package/lib/compiler/internal/build/mergeProjectInputSnapshots.js +121 -0
- package/lib/compiler/internal/build/mergeProjectInputSnapshots.js.map +1 -0
- package/lib/compiler/internal/build/normalizeBuildOutput.d.ts +29 -0
- package/lib/compiler/internal/build/normalizeBuildOutput.js +72 -0
- package/lib/compiler/internal/build/normalizeBuildOutput.js.map +1 -0
- package/lib/compiler/internal/build/parseProjectInputSnapshot.d.ts +26 -0
- package/lib/compiler/internal/build/parseProjectInputSnapshot.js +68 -0
- package/lib/compiler/internal/build/parseProjectInputSnapshot.js.map +1 -0
- package/lib/compiler/internal/build/planResidentCheckEntries.d.ts +21 -0
- package/lib/compiler/internal/build/planResidentCheckEntries.js +45 -0
- package/lib/compiler/internal/build/planResidentCheckEntries.js.map +1 -0
- package/lib/compiler/internal/build/privateRuntimeRootDir.d.ts +20 -0
- package/lib/compiler/internal/build/privateRuntimeRootDir.js +35 -0
- package/lib/compiler/internal/build/privateRuntimeRootDir.js.map +1 -0
- package/lib/compiler/internal/build/residentCheckRequest.d.ts +22 -0
- package/lib/compiler/internal/build/residentCheckRequest.js +42 -0
- package/lib/compiler/internal/build/residentCheckRequest.js.map +1 -0
- package/lib/compiler/internal/build/runBuild.d.ts +22 -0
- package/lib/compiler/internal/build/runBuild.js +44 -0
- package/lib/compiler/internal/build/runBuild.js.map +1 -0
- package/lib/compiler/internal/build/runExternalEmitProvenance.d.ts +61 -0
- package/lib/compiler/internal/build/runExternalEmitProvenance.js +451 -0
- package/lib/compiler/internal/build/runExternalEmitProvenance.js.map +1 -0
- package/lib/compiler/internal/build/takeResidentCheckEntryRequest.d.ts +18 -0
- package/lib/compiler/internal/build/takeResidentCheckEntryRequest.js +28 -0
- package/lib/compiler/internal/build/takeResidentCheckEntryRequest.js.map +1 -0
- package/lib/compiler/internal/buildNativeCompiler.d.ts +16 -1
- package/lib/compiler/internal/buildNativeCompiler.js +14 -2
- package/lib/compiler/internal/buildNativeCompiler.js.map +1 -1
- package/lib/compiler/internal/captureProcessOutput.d.ts +23 -23
- package/lib/compiler/internal/captureProcessOutput.js +38 -26
- package/lib/compiler/internal/captureProcessOutput.js.map +1 -1
- package/lib/compiler/internal/compileProjectInMemory.d.ts +30 -7
- package/lib/compiler/internal/compileProjectInMemory.js +103 -83
- package/lib/compiler/internal/compileProjectInMemory.js.map +1 -1
- package/lib/compiler/internal/ensureExecutable.d.ts +15 -0
- package/lib/compiler/internal/ensureExecutable.js +40 -0
- package/lib/compiler/internal/ensureExecutable.js.map +1 -0
- package/lib/compiler/internal/findNearestGoMod.d.ts +23 -0
- package/lib/compiler/internal/findNearestGoMod.js +48 -0
- package/lib/compiler/internal/findNearestGoMod.js.map +1 -0
- package/lib/compiler/internal/isOutsideRelativePath.d.ts +18 -0
- package/lib/compiler/internal/isOutsideRelativePath.js +30 -0
- package/lib/compiler/internal/isOutsideRelativePath.js.map +1 -0
- package/lib/compiler/internal/outputText.d.ts +16 -0
- package/lib/compiler/internal/outputText.js +25 -0
- package/lib/compiler/internal/outputText.js.map +1 -0
- package/lib/compiler/internal/packageRootDir.d.ts +25 -0
- package/lib/compiler/internal/packageRootDir.js +47 -0
- package/lib/compiler/internal/packageRootDir.js.map +1 -0
- package/lib/compiler/internal/parseNativeTransformOutput.d.ts +88 -0
- package/lib/compiler/internal/parseNativeTransformOutput.js +552 -0
- package/lib/compiler/internal/parseNativeTransformOutput.js.map +1 -0
- package/lib/compiler/internal/project/CompilerProjectSelection.d.ts +80 -0
- package/lib/compiler/internal/project/CompilerProjectSelection.js +187 -0
- package/lib/compiler/internal/project/CompilerProjectSelection.js.map +1 -0
- package/lib/compiler/internal/project/ConfigJsonText.d.ts +50 -0
- package/lib/compiler/internal/project/ConfigJsonText.js +61 -0
- package/lib/compiler/internal/project/ConfigJsonText.js.map +1 -0
- package/lib/compiler/internal/project/compilerUsesCaseSensitiveFileNames.d.ts +48 -0
- package/lib/compiler/internal/project/compilerUsesCaseSensitiveFileNames.js +119 -0
- package/lib/compiler/internal/project/compilerUsesCaseSensitiveFileNames.js.map +1 -0
- package/lib/compiler/internal/project/createNativeProjectContextArgs.d.ts +11 -8
- package/lib/compiler/internal/project/createNativeProjectContextArgs.js +15 -17
- package/lib/compiler/internal/project/createNativeProjectContextArgs.js.map +1 -1
- package/lib/compiler/internal/project/createNativeProjectContextJson.d.ts +19 -0
- package/lib/compiler/internal/project/createNativeProjectContextJson.js +27 -0
- package/lib/compiler/internal/project/createNativeProjectContextJson.js.map +1 -0
- package/lib/compiler/internal/project/parseJsonc.d.ts +42 -0
- package/lib/compiler/internal/project/parseJsonc.js +317 -0
- package/lib/compiler/internal/project/parseJsonc.js.map +1 -0
- package/lib/compiler/internal/project/readJsonFile.d.ts +21 -0
- package/lib/compiler/internal/project/readJsonFile.js +38 -0
- package/lib/compiler/internal/project/readJsonFile.js.map +1 -0
- package/lib/compiler/internal/project/readJsoncFile.d.ts +20 -0
- package/lib/compiler/internal/project/readJsoncFile.js +47 -0
- package/lib/compiler/internal/project/readJsoncFile.js.map +1 -0
- package/lib/compiler/internal/project/readProjectConfig.d.ts +29 -2
- package/lib/compiler/internal/project/readProjectConfig.js +105 -168
- package/lib/compiler/internal/project/readProjectConfig.js.map +1 -1
- package/lib/compiler/internal/project/resolveOwningProjectConfig.d.ts +65 -0
- package/lib/compiler/internal/project/resolveOwningProjectConfig.js +248 -0
- package/lib/compiler/internal/project/resolveOwningProjectConfig.js.map +1 -0
- package/lib/compiler/internal/project/resolveProjectConfig.d.ts +17 -14
- package/lib/compiler/internal/project/resolveProjectConfig.js +19 -122
- package/lib/compiler/internal/project/resolveProjectConfig.js.map +1 -1
- package/lib/compiler/internal/project/resolveProjectIdentity.d.ts +32 -0
- package/lib/compiler/internal/project/resolveProjectIdentity.js +144 -0
- package/lib/compiler/internal/project/resolveProjectIdentity.js.map +1 -0
- package/lib/compiler/internal/project/resolveTsconfigExtends.d.ts +38 -0
- package/lib/compiler/internal/project/resolveTsconfigExtends.js +163 -0
- package/lib/compiler/internal/project/resolveTsconfigExtends.js.map +1 -0
- package/lib/compiler/internal/project/selectReferencedProject.d.ts +26 -0
- package/lib/compiler/internal/project/selectReferencedProject.js +48 -0
- package/lib/compiler/internal/project/selectReferencedProject.js.map +1 -0
- package/lib/compiler/internal/project/tsconfigExtendsFileCandidates.d.ts +34 -0
- package/lib/compiler/internal/project/tsconfigExtendsFileCandidates.js +55 -0
- package/lib/compiler/internal/project/tsconfigExtendsFileCandidates.js.map +1 -0
- package/lib/compiler/internal/readEffectiveCompilerOptions.d.ts +54 -0
- package/lib/compiler/internal/readEffectiveCompilerOptions.js +116 -0
- package/lib/compiler/internal/readEffectiveCompilerOptions.js.map +1 -0
- package/lib/compiler/internal/resolveBinary.d.ts +17 -1
- package/lib/compiler/internal/resolveBinary.js +24 -9
- package/lib/compiler/internal/resolveBinary.js.map +1 -1
- package/lib/compiler/internal/resolveTsgo.d.ts +22 -7
- package/lib/compiler/internal/resolveTsgo.js +25 -9
- package/lib/compiler/internal/resolveTsgo.js.map +1 -1
- package/lib/compiler/internal/runNativeCheckWithObservations.d.ts +41 -0
- package/lib/compiler/internal/runNativeCheckWithObservations.js +185 -0
- package/lib/compiler/internal/runNativeCheckWithObservations.js.map +1 -0
- package/lib/compiler/internal/runSingleFileEmit.d.ts +26 -5
- package/lib/compiler/internal/runSingleFileEmit.js +82 -27
- package/lib/compiler/internal/runSingleFileEmit.js.map +1 -1
- package/lib/compiler/internal/sharedHost/SEMANTIC_CONFIG_PATH_ENV.d.ts +2 -0
- package/lib/compiler/internal/sharedHost/SEMANTIC_CONFIG_PATH_ENV.js +6 -0
- package/lib/compiler/internal/sharedHost/SEMANTIC_CONFIG_PATH_ENV.js.map +1 -0
- package/lib/compiler/internal/sharedHost/SidecarEnvironment.d.ts +90 -0
- package/lib/compiler/internal/sharedHost/SidecarEnvironment.js +153 -0
- package/lib/compiler/internal/sharedHost/SidecarEnvironment.js.map +1 -0
- package/lib/compiler/internal/sharedHost/TSGO_ARGS_CWD_ENV.d.ts +7 -0
- package/lib/compiler/internal/sharedHost/TSGO_ARGS_CWD_ENV.js +11 -0
- package/lib/compiler/internal/sharedHost/TSGO_ARGS_CWD_ENV.js.map +1 -0
- package/lib/compiler/internal/sharedHost/TSGO_ARGS_ENV.d.ts +7 -0
- package/lib/compiler/internal/sharedHost/TSGO_ARGS_ENV.js +11 -0
- package/lib/compiler/internal/sharedHost/TSGO_ARGS_ENV.js.map +1 -0
- package/lib/compiler/internal/sharedHost/assertSharedHostCompatibility.d.ts +24 -0
- package/lib/compiler/internal/sharedHost/assertSharedHostCompatibility.js +46 -0
- package/lib/compiler/internal/sharedHost/assertSharedHostCompatibility.js.map +1 -0
- package/lib/compiler/internal/sharedHost/clearInheritedSemanticConfigPath.d.ts +15 -0
- package/lib/compiler/internal/sharedHost/clearInheritedSemanticConfigPath.js +23 -0
- package/lib/compiler/internal/sharedHost/clearInheritedSemanticConfigPath.js.map +1 -0
- package/lib/compiler/internal/sharedHost/clearInheritedTsgoArgs.d.ts +23 -0
- package/lib/compiler/internal/sharedHost/clearInheritedTsgoArgs.js +33 -0
- package/lib/compiler/internal/sharedHost/clearInheritedTsgoArgs.js.map +1 -0
- package/lib/compiler/internal/sharedHost/inheritedSidecarEnv.d.ts +27 -0
- package/lib/compiler/internal/sharedHost/inheritedSidecarEnv.js +41 -0
- package/lib/compiler/internal/sharedHost/inheritedSidecarEnv.js.map +1 -0
- package/lib/compiler/internal/sharedHost/isLinkedTransform.d.ts +16 -0
- package/lib/compiler/internal/sharedHost/isLinkedTransform.js +21 -0
- package/lib/compiler/internal/sharedHost/isLinkedTransform.js.map +1 -0
- package/lib/compiler/internal/sharedHost/linkedTransformPlugins.d.ts +19 -0
- package/lib/compiler/internal/sharedHost/linkedTransformPlugins.js +25 -0
- package/lib/compiler/internal/sharedHost/linkedTransformPlugins.js.map +1 -0
- package/lib/compiler/internal/sharedHost/publishLinkedTransformPlugins.d.ts +25 -0
- package/lib/compiler/internal/sharedHost/publishLinkedTransformPlugins.js +35 -0
- package/lib/compiler/internal/sharedHost/publishLinkedTransformPlugins.js.map +1 -0
- package/lib/compiler/internal/sharedHost/resolvePluginConfigDir.d.ts +26 -0
- package/lib/compiler/internal/sharedHost/resolvePluginConfigDir.js +36 -0
- package/lib/compiler/internal/sharedHost/resolvePluginConfigDir.js.map +1 -0
- package/lib/compiler/internal/sharedHost/selectSharedHostPlugin.d.ts +22 -0
- package/lib/compiler/internal/sharedHost/selectSharedHostPlugin.js +32 -0
- package/lib/compiler/internal/sharedHost/selectSharedHostPlugin.js.map +1 -0
- package/lib/compiler/internal/spawnNative.d.ts +15 -16
- package/lib/compiler/internal/spawnNative.js +17 -45
- package/lib/compiler/internal/spawnNative.js.map +1 -1
- package/lib/compiler/internal/startResidentTransform.d.ts +26 -17
- package/lib/compiler/internal/startResidentTransform.js +51 -36
- package/lib/compiler/internal/startResidentTransform.js.map +1 -1
- package/lib/compiler/internal/transformProjectInMemory.d.ts +42 -5
- package/lib/compiler/internal/transformProjectInMemory.js +189 -469
- package/lib/compiler/internal/transformProjectInMemory.js.map +1 -1
- package/lib/compiler/internal/transformProjectInWorker.d.ts +49 -0
- package/lib/compiler/internal/transformProjectInWorker.js +168 -0
- package/lib/compiler/internal/transformProjectInWorker.js.map +1 -0
- package/lib/compiler/internal/transformProjectWorker.js +37 -0
- package/lib/compiler/internal/transformProjectWorker.js.map +1 -0
- package/lib/flags/AnySubcommand.d.ts +18 -0
- package/lib/flags/AnySubcommand.js +3 -0
- package/lib/flags/AnySubcommand.js.map +1 -0
- package/lib/flags/COMPILER_ENUM_WHITESPACE.d.ts +2 -0
- package/lib/flags/COMPILER_ENUM_WHITESPACE.js +38 -0
- package/lib/flags/COMPILER_ENUM_WHITESPACE.js.map +1 -0
- package/lib/flags/COMPILER_OPTIONS.d.ts +6 -0
- package/lib/flags/COMPILER_OPTIONS.js +509 -0
- package/lib/flags/COMPILER_OPTIONS.js.map +1 -0
- package/lib/flags/COMPILER_OPTION_ASCII_FOLDS.d.ts +2 -0
- package/lib/flags/COMPILER_OPTION_ASCII_FOLDS.js +13 -0
- package/lib/flags/COMPILER_OPTION_ASCII_FOLDS.js.map +1 -0
- package/lib/flags/COMPILER_OPTION_KINDS.d.ts +2 -0
- package/lib/flags/COMPILER_OPTION_KINDS.js +14 -0
- package/lib/flags/COMPILER_OPTION_KINDS.js.map +1 -0
- package/lib/flags/CompilerOptionSpec.d.ts +27 -0
- package/lib/flags/CompilerOptionSpec.js +3 -0
- package/lib/flags/CompilerOptionSpec.js.map +1 -0
- package/lib/flags/FLAG_BY_TOKEN.d.ts +8 -0
- package/lib/flags/FLAG_BY_TOKEN.js +34 -0
- package/lib/flags/FLAG_BY_TOKEN.js.map +1 -0
- package/lib/flags/FLAG_SCHEMA.d.ts +35 -0
- package/lib/flags/{schema.js → FLAG_SCHEMA.js} +47 -153
- package/lib/flags/FLAG_SCHEMA.js.map +1 -0
- package/lib/flags/FlagKind.d.ts +22 -0
- package/lib/flags/FlagKind.js +3 -0
- package/lib/flags/FlagKind.js.map +1 -0
- package/lib/flags/FlagLayer.d.ts +19 -0
- package/lib/flags/FlagLayer.js +3 -0
- package/lib/flags/FlagLayer.js.map +1 -0
- package/lib/flags/FlagSpec.d.ts +104 -0
- package/lib/flags/FlagSpec.js +3 -0
- package/lib/flags/FlagSpec.js.map +1 -0
- package/lib/flags/ParseOptions.d.ts +92 -0
- package/lib/flags/ParseOptions.js +3 -0
- package/lib/flags/ParseOptions.js.map +1 -0
- package/lib/flags/ParseResult.d.ts +37 -0
- package/lib/flags/ParseResult.js +3 -0
- package/lib/flags/ParseResult.js.map +1 -0
- package/lib/flags/TtscSubcommand.d.ts +14 -0
- package/lib/flags/TtscSubcommand.js +3 -0
- package/lib/flags/TtscSubcommand.js.map +1 -0
- package/lib/flags/TtsxSubcommand.d.ts +13 -0
- package/lib/flags/TtsxSubcommand.js +3 -0
- package/lib/flags/TtsxSubcommand.js.map +1 -0
- package/lib/flags/ValueValidator.d.ts +14 -0
- package/lib/flags/ValueValidator.js +3 -0
- package/lib/flags/ValueValidator.js.map +1 -0
- package/lib/flags/buildGoAllowList.d.ts +18 -0
- package/lib/flags/buildGoAllowList.js +45 -0
- package/lib/flags/buildGoAllowList.js.map +1 -0
- package/lib/flags/flagsForSubcommand.d.ts +18 -0
- package/lib/flags/flagsForSubcommand.js +23 -0
- package/lib/flags/flagsForSubcommand.js.map +1 -0
- package/lib/flags/getBoolean.d.ts +19 -0
- package/lib/flags/getBoolean.js +27 -0
- package/lib/flags/getBoolean.js.map +1 -0
- package/lib/flags/getNumber.d.ts +16 -0
- package/lib/flags/getNumber.js +24 -0
- package/lib/flags/getNumber.js.map +1 -0
- package/lib/flags/getString.d.ts +16 -0
- package/lib/flags/getString.js +24 -0
- package/lib/flags/getString.js.map +1 -0
- package/lib/flags/getStringList.d.ts +19 -0
- package/lib/flags/getStringList.js +24 -0
- package/lib/flags/getStringList.js.map +1 -0
- package/lib/flags/normalizeCompilerEnumValue.d.ts +20 -0
- package/lib/flags/normalizeCompilerEnumValue.js +40 -0
- package/lib/flags/normalizeCompilerEnumValue.js.map +1 -0
- package/lib/flags/normalizeFlagToken.d.ts +28 -0
- package/lib/flags/normalizeFlagToken.js +38 -0
- package/lib/flags/normalizeFlagToken.js.map +1 -0
- package/lib/flags/parseFlags.d.ts +18 -0
- package/lib/flags/parseFlags.js +288 -0
- package/lib/flags/parseFlags.js.map +1 -0
- package/lib/flags/readCompilerOptionOccurrence.d.ts +34 -0
- package/lib/flags/readCompilerOptionOccurrence.js +81 -0
- package/lib/flags/readCompilerOptionOccurrence.js.map +1 -0
- package/lib/flags/readCompilerOptionValues.d.ts +33 -0
- package/lib/flags/readCompilerOptionValues.js +58 -0
- package/lib/flags/readCompilerOptionValues.js.map +1 -0
- package/lib/flags/resolveFlagSpec.d.ts +21 -0
- package/lib/flags/resolveFlagSpec.js +32 -0
- package/lib/flags/resolveFlagSpec.js.map +1 -0
- package/lib/index.d.ts +8 -3
- package/lib/index.js +10 -3
- package/lib/index.js.map +1 -1
- package/lib/internal/CanonicalTempDirectoryOperations.d.ts +73 -0
- package/lib/internal/CanonicalTempDirectoryOperations.js +3 -0
- package/lib/internal/CanonicalTempDirectoryOperations.js.map +1 -0
- package/lib/internal/CompilerContextSnapshot.d.ts +66 -0
- package/lib/internal/CompilerContextSnapshot.js +121 -0
- package/lib/internal/CompilerContextSnapshot.js.map +1 -0
- package/lib/internal/CompilerResultAdapter.d.ts +129 -0
- package/lib/internal/CompilerResultAdapter.js +247 -0
- package/lib/internal/CompilerResultAdapter.js.map +1 -0
- package/lib/internal/E2ETrace.d.ts +219 -0
- package/lib/internal/E2ETrace.js +541 -0
- package/lib/internal/E2ETrace.js.map +1 -0
- package/lib/internal/IJavaScriptRuntimeCapabilities.d.ts +48 -0
- package/lib/internal/IJavaScriptRuntimeCapabilities.js +3 -0
- package/lib/internal/IJavaScriptRuntimeCapabilities.js.map +1 -0
- package/lib/internal/OwnedNativeProcess.d.ts +66 -0
- package/lib/internal/OwnedNativeProcess.js +317 -0
- package/lib/internal/OwnedNativeProcess.js.map +1 -0
- package/lib/internal/OwnedSynchronousProcess.d.ts +158 -0
- package/lib/internal/OwnedSynchronousProcess.js +171 -0
- package/lib/internal/OwnedSynchronousProcess.js.map +1 -0
- package/lib/internal/RetireLockDirectoryOperations.d.ts +77 -0
- package/lib/internal/RetireLockDirectoryOperations.js +3 -0
- package/lib/internal/RetireLockDirectoryOperations.js.map +1 -0
- package/lib/internal/SafeCacheCleanupTarget.d.ts +39 -0
- package/lib/internal/SafeCacheCleanupTarget.js +3 -0
- package/lib/internal/SafeCacheCleanupTarget.js.map +1 -0
- package/lib/internal/SourceNativeRetirement.d.ts +384 -0
- package/lib/internal/SourceNativeRetirement.js +892 -0
- package/lib/internal/SourceNativeRetirement.js.map +1 -0
- package/lib/internal/SpawnSyncOutputFiles.d.ts +28 -0
- package/lib/internal/SpawnSyncOutputFiles.js +3 -0
- package/lib/internal/SpawnSyncOutputFiles.js.map +1 -0
- package/lib/internal/cacheEntryExists.d.ts +13 -0
- package/lib/internal/cacheEntryExists.js +32 -0
- package/lib/internal/cacheEntryExists.js.map +1 -0
- package/lib/internal/createCanonicalTempDirectory.d.ts +23 -13
- package/lib/internal/createCanonicalTempDirectory.js +31 -12
- package/lib/internal/createCanonicalTempDirectory.js.map +1 -1
- package/lib/internal/isContendedCandidateRename.d.ts +27 -0
- package/lib/internal/isContendedCandidateRename.js +37 -0
- package/lib/internal/isContendedCandidateRename.js.map +1 -0
- package/lib/internal/isSpawnSyncFdExhaustion.d.ts +16 -0
- package/lib/internal/isSpawnSyncFdExhaustion.js +23 -0
- package/lib/internal/isSpawnSyncFdExhaustion.js.map +1 -0
- package/lib/internal/javascriptRuntimeCapabilities.d.ts +20 -0
- package/lib/internal/javascriptRuntimeCapabilities.js +142 -0
- package/lib/internal/javascriptRuntimeCapabilities.js.map +1 -0
- package/lib/internal/nativeBinary.d.ts +11 -0
- package/lib/internal/nativeBinary.js +16 -0
- package/lib/internal/nativeBinary.js.map +1 -0
- package/lib/internal/parseWindowsDirectoryCaseSensitivity.d.ts +24 -0
- package/lib/internal/parseWindowsDirectoryCaseSensitivity.js +47 -0
- package/lib/internal/parseWindowsDirectoryCaseSensitivity.js.map +1 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentity.d.ts +43 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentity.js +3 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentity.js.map +1 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentityContext.d.ts +176 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentityContext.js +3 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentityContext.js.map +1 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentityOperations.d.ts +100 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentityOperations.js +3 -0
- package/lib/internal/pathIdentity/FilesystemPathIdentityOperations.js.map +1 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentity.d.ts +20 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentity.js +3 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentity.js.map +1 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentityContext.d.ts +20 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentityContext.js +3 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentityContext.js.map +1 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentityOperations.d.ts +20 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentityOperations.js +3 -0
- package/lib/internal/pathIdentity/ProjectInputPathIdentityOperations.js.map +1 -0
- package/lib/internal/pathIdentity/createFilesystemPathIdentityContext.d.ts +25 -0
- package/lib/internal/pathIdentity/createFilesystemPathIdentityContext.js +336 -0
- package/lib/internal/pathIdentity/createFilesystemPathIdentityContext.js.map +1 -0
- package/lib/internal/pathIdentity/createProjectInputPathIdentityContext.d.ts +28 -0
- package/lib/internal/pathIdentity/createProjectInputPathIdentityContext.js +33 -0
- package/lib/internal/pathIdentity/createProjectInputPathIdentityContext.js.map +1 -0
- package/lib/internal/pathIdentity/isFilesystemPathIdentityWithin.d.ts +20 -0
- package/lib/internal/pathIdentity/isFilesystemPathIdentityWithin.js +33 -0
- package/lib/internal/pathIdentity/isFilesystemPathIdentityWithin.js.map +1 -0
- package/lib/internal/pathIdentity/isProjectInputPathIdentityWithin.d.ts +15 -0
- package/lib/internal/pathIdentity/isProjectInputPathIdentityWithin.js +22 -0
- package/lib/internal/pathIdentity/isProjectInputPathIdentityWithin.js.map +1 -0
- package/lib/internal/pathIdentity/resolveFilesystemPath.d.ts +22 -0
- package/lib/internal/pathIdentity/resolveFilesystemPath.js +44 -0
- package/lib/internal/pathIdentity/resolveFilesystemPath.js.map +1 -0
- package/lib/internal/pathIdentity/resolvePhysicalPath.d.ts +21 -0
- package/lib/internal/pathIdentity/resolvePhysicalPath.js +35 -0
- package/lib/internal/pathIdentity/resolvePhysicalPath.js.map +1 -0
- package/lib/internal/pathIdentity/resolveProjectInputPath.d.ts +14 -0
- package/lib/internal/pathIdentity/resolveProjectInputPath.js +21 -0
- package/lib/internal/pathIdentity/resolveProjectInputPath.js.map +1 -0
- package/lib/internal/pluginSource.d.ts +26 -0
- package/lib/internal/pluginSource.js +43 -0
- package/lib/internal/pluginSource.js.map +1 -0
- package/lib/internal/projectInputPathIdentity.d.ts +27 -31
- package/lib/internal/projectInputPathIdentity.js +37 -275
- package/lib/internal/projectInputPathIdentity.js.map +1 -1
- package/lib/internal/resolveNodeBinary.d.ts +9 -7
- package/lib/internal/resolveNodeBinary.js +14 -144
- package/lib/internal/resolveNodeBinary.js.map +1 -1
- package/lib/internal/resolveSafeCacheCleanupTargets.d.ts +27 -8
- package/lib/internal/resolveSafeCacheCleanupTargets.js +44 -11
- package/lib/internal/resolveSafeCacheCleanupTargets.js.map +1 -1
- package/lib/internal/restoreCompilerError.d.ts +21 -0
- package/lib/internal/restoreCompilerError.js +164 -0
- package/lib/internal/restoreCompilerError.js.map +1 -0
- package/lib/internal/retireLockDirectory.d.ts +45 -0
- package/lib/internal/retireLockDirectory.js +152 -0
- package/lib/internal/retireLockDirectory.js.map +1 -0
- package/lib/internal/runHoldingLock.d.ts +30 -0
- package/lib/internal/runHoldingLock.js +53 -0
- package/lib/internal/runHoldingLock.js.map +1 -0
- package/lib/internal/runtimeExecutableIdentity.d.ts +20 -0
- package/lib/internal/runtimeExecutableIdentity.js +171 -0
- package/lib/internal/runtimeExecutableIdentity.js.map +1 -0
- package/lib/internal/serializeCompilerError.d.ts +28 -0
- package/lib/internal/serializeCompilerError.js +138 -0
- package/lib/internal/serializeCompilerError.js.map +1 -0
- package/lib/internal/spawnSyncResilient.d.ts +21 -10
- package/lib/internal/spawnSyncResilient.js +31 -147
- package/lib/internal/spawnSyncResilient.js.map +1 -1
- package/lib/internal/spawnSyncWithLowDescriptors.d.ts +30 -0
- package/lib/internal/spawnSyncWithLowDescriptors.js +194 -0
- package/lib/internal/spawnSyncWithLowDescriptors.js.map +1 -0
- package/lib/internal/tsconfig.d.ts +16 -0
- package/lib/internal/tsconfig.js +33 -0
- package/lib/internal/tsconfig.js.map +1 -0
- package/lib/launcher/internal/PendingResidentCheckWatchChanges.d.ts +56 -0
- package/lib/launcher/internal/PendingResidentCheckWatchChanges.js +97 -0
- package/lib/launcher/internal/PendingResidentCheckWatchChanges.js.map +1 -0
- package/lib/launcher/internal/TtscBuildMode.d.ts +14 -0
- package/lib/launcher/internal/TtscBuildMode.js +3 -0
- package/lib/launcher/internal/TtscBuildMode.js.map +1 -0
- package/lib/launcher/internal/TtsxEntryOptions.d.ts +50 -0
- package/lib/launcher/internal/TtsxEntryOptions.js +94 -0
- package/lib/launcher/internal/TtsxEntryOptions.js.map +1 -0
- package/lib/launcher/internal/assertNoSolutionBuild.d.ts +17 -10
- package/lib/launcher/internal/assertNoSolutionBuild.js +16 -9
- package/lib/launcher/internal/assertNoSolutionBuild.js.map +1 -1
- package/lib/launcher/internal/assertTtsxNoWatch.d.ts +25 -0
- package/lib/launcher/internal/assertTtsxNoWatch.js +46 -0
- package/lib/launcher/internal/assertTtsxNoWatch.js.map +1 -0
- package/lib/launcher/internal/buildSingleRootProject.d.ts +108 -0
- package/lib/launcher/internal/buildSingleRootProject.js +229 -0
- package/lib/launcher/internal/buildSingleRootProject.js.map +1 -0
- package/lib/launcher/internal/getCompilerVersionText.d.ts +14 -1
- package/lib/launcher/internal/getCompilerVersionText.js +21 -6
- package/lib/launcher/internal/getCompilerVersionText.js.map +1 -1
- package/lib/launcher/internal/inlineServedSourceMap.d.ts +35 -0
- package/lib/launcher/internal/inlineServedSourceMap.js +255 -0
- package/lib/launcher/internal/inlineServedSourceMap.js.map +1 -0
- package/lib/launcher/internal/linkVirtualEntry.d.ts +31 -0
- package/lib/launcher/internal/linkVirtualEntry.js +87 -0
- package/lib/launcher/internal/linkVirtualEntry.js.map +1 -0
- package/lib/launcher/internal/parseCommonJsExports.d.ts +17 -0
- package/lib/launcher/internal/{commonJsExportMetadata.js → parseCommonJsExports.js} +13 -3
- package/lib/launcher/internal/parseCommonJsExports.js.map +1 -0
- package/lib/launcher/internal/parseTtscBuildArgs.d.ts +34 -0
- package/lib/launcher/internal/parseTtscBuildArgs.js +97 -0
- package/lib/launcher/internal/parseTtscBuildArgs.js.map +1 -0
- package/lib/launcher/internal/parseTtsxCLI.d.ts +35 -0
- package/lib/launcher/internal/parseTtsxCLI.js +187 -0
- package/lib/launcher/internal/parseTtsxCLI.js.map +1 -0
- package/lib/launcher/internal/prepareExecution.d.ts +49 -5
- package/lib/launcher/internal/prepareExecution.js +360 -324
- package/lib/launcher/internal/prepareExecution.js.map +1 -1
- package/lib/launcher/internal/prepareTtscBuildMode.d.ts +23 -0
- package/lib/launcher/internal/prepareTtscBuildMode.js +58 -0
- package/lib/launcher/internal/prepareTtscBuildMode.js.map +1 -0
- package/lib/launcher/internal/resolveCacheDir.d.ts +12 -3
- package/lib/launcher/internal/resolveCacheDir.js +12 -3
- package/lib/launcher/internal/resolveCacheDir.js.map +1 -1
- package/lib/launcher/internal/resolveSingleFileOutput.d.ts +35 -0
- package/lib/launcher/internal/resolveSingleFileOutput.js +115 -0
- package/lib/launcher/internal/resolveSingleFileOutput.js.map +1 -0
- package/lib/launcher/internal/resolveTtscserverBinary.d.ts +15 -3
- package/lib/launcher/internal/resolveTtscserverBinary.js +19 -5
- package/lib/launcher/internal/resolveTtscserverBinary.js.map +1 -1
- package/lib/launcher/internal/runTtsc.d.ts +23 -23
- package/lib/launcher/internal/runTtsc.js +336 -286
- package/lib/launcher/internal/runTtsc.js.map +1 -1
- package/lib/launcher/internal/runTtsx.d.ts +32 -4
- package/lib/launcher/internal/runTtsx.js +286 -138
- package/lib/launcher/internal/runTtsx.js.map +1 -1
- package/lib/launcher/internal/runtime/CommonJsRuntimeSource.d.ts +92 -0
- package/lib/launcher/internal/runtime/CommonJsRuntimeSource.js +354 -0
- package/lib/launcher/internal/runtime/CommonJsRuntimeSource.js.map +1 -0
- package/lib/launcher/internal/runtime/DependencyBuildAdmission.d.ts +72 -0
- package/lib/launcher/internal/runtime/DependencyBuildAdmission.js +120 -0
- package/lib/launcher/internal/runtime/DependencyBuildAdmission.js.map +1 -0
- package/lib/launcher/internal/runtime/DependencyBuildGeneration.d.ts +185 -0
- package/lib/launcher/internal/runtime/DependencyBuildGeneration.js +153 -0
- package/lib/launcher/internal/runtime/DependencyBuildGeneration.js.map +1 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockFence.d.ts +22 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockFence.js +3 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockFence.js.map +1 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockLease.d.ts +22 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockLease.js +3 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockLease.js.map +1 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockObservation.d.ts +41 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockObservation.js +3 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockObservation.js.map +1 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockProtocol.d.ts +83 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockProtocol.js +126 -0
- package/lib/launcher/internal/runtime/DependencyBuildLockProtocol.js.map +1 -0
- package/lib/launcher/internal/runtime/OwnedProjectSource.d.ts +112 -0
- package/lib/launcher/internal/runtime/OwnedProjectSource.js +59 -0
- package/lib/launcher/internal/runtime/OwnedProjectSource.js.map +1 -0
- package/lib/launcher/internal/runtime/OwningModuleOptions.d.ts +21 -0
- package/lib/launcher/internal/runtime/OwningModuleOptions.js +3 -0
- package/lib/launcher/internal/runtime/OwningModuleOptions.js.map +1 -0
- package/lib/launcher/internal/runtime/PluginDescriptorInputObservation.d.ts +89 -0
- package/lib/launcher/internal/runtime/PluginDescriptorInputObservation.js +115 -0
- package/lib/launcher/internal/runtime/PluginDescriptorInputObservation.js.map +1 -0
- package/lib/launcher/internal/runtime/ProcessOwnedDirectory.d.ts +168 -0
- package/lib/launcher/internal/runtime/ProcessOwnedDirectory.js +251 -0
- package/lib/launcher/internal/runtime/ProcessOwnedDirectory.js.map +1 -0
- package/lib/launcher/internal/runtime/ResolveResult.d.ts +24 -0
- package/lib/launcher/internal/runtime/ResolveResult.js +3 -0
- package/lib/launcher/internal/runtime/ResolveResult.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeEmitProvenance.d.ts +38 -0
- package/lib/launcher/internal/runtime/RuntimeEmitProvenance.js +60 -0
- package/lib/launcher/internal/runtime/RuntimeEmitProvenance.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeEntryPreparer.d.ts +22 -0
- package/lib/launcher/internal/runtime/RuntimeEntryPreparer.js +3 -0
- package/lib/launcher/internal/runtime/RuntimeEntryPreparer.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeFilesystem.d.ts +52 -0
- package/lib/launcher/internal/runtime/RuntimeFilesystem.js +73 -0
- package/lib/launcher/internal/runtime/RuntimeFilesystem.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeHookOptions.d.ts +22 -0
- package/lib/launcher/internal/runtime/RuntimeHookOptions.js +3 -0
- package/lib/launcher/internal/runtime/RuntimeHookOptions.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeIsolatedEmit.d.ts +53 -0
- package/lib/launcher/internal/runtime/RuntimeIsolatedEmit.js +88 -0
- package/lib/launcher/internal/runtime/RuntimeIsolatedEmit.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeLoaderCapabilities.d.ts +78 -0
- package/lib/launcher/internal/runtime/RuntimeLoaderCapabilities.js +256 -0
- package/lib/launcher/internal/runtime/RuntimeLoaderCapabilities.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeManifest.d.ts +65 -0
- package/lib/launcher/internal/runtime/RuntimeManifest.js +3 -0
- package/lib/launcher/internal/runtime/RuntimeManifest.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeManifestRegistry.d.ts +95 -0
- package/lib/launcher/internal/runtime/RuntimeManifestRegistry.js +268 -0
- package/lib/launcher/internal/runtime/RuntimeManifestRegistry.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeModuleFormat.d.ts +60 -0
- package/lib/launcher/internal/runtime/RuntimeModuleFormat.js +249 -0
- package/lib/launcher/internal/runtime/RuntimeModuleFormat.js.map +1 -0
- package/lib/launcher/internal/runtime/RuntimeProjectOwnership.d.ts +50 -0
- package/lib/launcher/internal/runtime/RuntimeProjectOwnership.js +134 -0
- package/lib/launcher/internal/runtime/RuntimeProjectOwnership.js.map +1 -0
- package/lib/launcher/internal/runtime/TTSX_MINIMUM_NODE_VERSION.d.ts +11 -0
- package/lib/launcher/internal/runtime/TTSX_MINIMUM_NODE_VERSION.js +15 -0
- package/lib/launcher/internal/runtime/TTSX_MINIMUM_NODE_VERSION.js.map +1 -0
- package/lib/launcher/internal/runtime/acquireDependencyBuildLock.d.ts +22 -0
- package/lib/launcher/internal/runtime/acquireDependencyBuildLock.js +74 -0
- package/lib/launcher/internal/runtime/acquireDependencyBuildLock.js.map +1 -0
- package/lib/launcher/internal/runtime/checkNodeRuntimeSupport.d.ts +30 -0
- package/lib/launcher/internal/runtime/checkNodeRuntimeSupport.js +83 -0
- package/lib/launcher/internal/runtime/checkNodeRuntimeSupport.js.map +1 -0
- package/lib/launcher/internal/runtime/claimRuntimeProjectDirectory.d.ts +30 -0
- package/lib/launcher/internal/runtime/claimRuntimeProjectDirectory.js +52 -0
- package/lib/launcher/internal/runtime/claimRuntimeProjectDirectory.js.map +1 -0
- package/lib/launcher/internal/runtime/commonJsExportNames.d.ts +21 -0
- package/lib/launcher/internal/runtime/commonJsExportNames.js +68 -0
- package/lib/launcher/internal/runtime/commonJsExportNames.js.map +1 -0
- package/lib/launcher/internal/runtime/commonJsImportFacade.d.ts +32 -0
- package/lib/launcher/internal/runtime/commonJsImportFacade.js +56 -0
- package/lib/launcher/internal/runtime/commonJsImportFacade.js.map +1 -0
- package/lib/launcher/internal/runtime/dependencyCacheKey.d.ts +36 -0
- package/lib/launcher/internal/runtime/dependencyCacheKey.js +57 -0
- package/lib/launcher/internal/runtime/dependencyCacheKey.js.map +1 -0
- package/lib/launcher/internal/runtime/dependencyCacheRoot.d.ts +32 -0
- package/lib/launcher/internal/runtime/dependencyCacheRoot.js +98 -0
- package/lib/launcher/internal/runtime/dependencyCacheRoot.js.map +1 -0
- package/lib/launcher/internal/runtime/inspectDependencyBuildLock.d.ts +23 -0
- package/lib/launcher/internal/runtime/inspectDependencyBuildLock.js +126 -0
- package/lib/launcher/internal/runtime/inspectDependencyBuildLock.js.map +1 -0
- package/lib/launcher/internal/runtime/installRuntimeHooks.d.ts +58 -0
- package/lib/launcher/internal/runtime/installRuntimeHooks.js +1988 -0
- package/lib/launcher/internal/runtime/installRuntimeHooks.js.map +1 -0
- package/lib/launcher/internal/runtime/interopProbe.d.ts +8 -0
- package/lib/launcher/internal/runtime/interopProbe.js +3 -0
- package/lib/launcher/internal/runtime/interopProbe.js.map +1 -0
- package/lib/launcher/internal/runtime/isLocalProcessGone.d.ts +33 -0
- package/lib/launcher/internal/runtime/isLocalProcessGone.js +60 -0
- package/lib/launcher/internal/runtime/isLocalProcessGone.js.map +1 -0
- package/lib/launcher/internal/runtime/observeMappedDescriptorResolution.d.ts +28 -0
- package/lib/launcher/internal/runtime/observeMappedDescriptorResolution.js +50 -0
- package/lib/launcher/internal/runtime/observeMappedDescriptorResolution.js.map +1 -0
- package/lib/launcher/internal/runtime/projectModuleOptions.d.ts +16 -0
- package/lib/launcher/internal/runtime/projectModuleOptions.js +28 -0
- package/lib/launcher/internal/runtime/projectModuleOptions.js.map +1 -0
- package/lib/launcher/internal/runtime/readDependencyCache.d.ts +28 -0
- package/lib/launcher/internal/runtime/readDependencyCache.js +83 -0
- package/lib/launcher/internal/runtime/readDependencyCache.js.map +1 -0
- package/lib/launcher/internal/runtime/realPath.d.ts +22 -0
- package/lib/launcher/internal/runtime/realPath.js +37 -0
- package/lib/launcher/internal/runtime/realPath.js.map +1 -0
- package/lib/launcher/internal/runtime/reclaimDependencyBuildLock.d.ts +17 -0
- package/lib/launcher/internal/runtime/reclaimDependencyBuildLock.js +23 -0
- package/lib/launcher/internal/runtime/reclaimDependencyBuildLock.js.map +1 -0
- package/lib/launcher/internal/runtime/releaseDependencyBuildLock.d.ts +17 -0
- package/lib/launcher/internal/runtime/releaseDependencyBuildLock.js +23 -0
- package/lib/launcher/internal/runtime/releaseDependencyBuildLock.js.map +1 -0
- package/lib/launcher/internal/runtime/resolveRuntimeCleanTargets.d.ts +34 -0
- package/lib/launcher/internal/runtime/resolveRuntimeCleanTargets.js +88 -0
- package/lib/launcher/internal/runtime/resolveRuntimeCleanTargets.js.map +1 -0
- package/lib/launcher/internal/runtime/restoreStrippedNodeBuiltinScheme.d.ts +20 -0
- package/lib/launcher/internal/runtime/restoreStrippedNodeBuiltinScheme.js +30 -0
- package/lib/launcher/internal/runtime/restoreStrippedNodeBuiltinScheme.js.map +1 -0
- package/lib/launcher/internal/runtime/runtimeRunKey.d.ts +24 -0
- package/lib/launcher/internal/runtime/runtimeRunKey.js +36 -0
- package/lib/launcher/internal/runtime/runtimeRunKey.js.map +1 -0
- package/lib/launcher/internal/runtime/selectRuntimePluginPolicy.d.ts +21 -0
- package/lib/launcher/internal/runtime/selectRuntimePluginPolicy.js +29 -0
- package/lib/launcher/internal/runtime/selectRuntimePluginPolicy.js.map +1 -0
- package/lib/launcher/internal/runtime/withRuntimeDirectoryLock.d.ts +35 -0
- package/lib/launcher/internal/runtime/withRuntimeDirectoryLock.js +76 -0
- package/lib/launcher/internal/runtime/withRuntimeDirectoryLock.js.map +1 -0
- package/lib/launcher/internal/runtimeCompilerArgs.d.ts +35 -6
- package/lib/launcher/internal/runtimeCompilerArgs.js +87 -58
- package/lib/launcher/internal/runtimeCompilerArgs.js.map +1 -1
- package/lib/launcher/internal/runtimeEmitProfile.d.ts +39 -0
- package/lib/launcher/internal/runtimeEmitProfile.js +56 -0
- package/lib/launcher/internal/runtimeEmitProfile.js.map +1 -0
- package/lib/launcher/internal/runtimeHookPreload.js +4 -4
- package/lib/launcher/internal/runtimeHookPreload.js.map +1 -1
- package/lib/launcher/internal/runtimeOwnerPreload.d.ts +1 -0
- package/lib/launcher/internal/runtimeOwnerPreload.js +43 -0
- package/lib/launcher/internal/runtimeOwnerPreload.js.map +1 -0
- package/lib/launcher/internal/singleRootProjectConfig.d.ts +34 -0
- package/lib/launcher/internal/singleRootProjectConfig.js +39 -0
- package/lib/launcher/internal/singleRootProjectConfig.js.map +1 -0
- package/lib/launcher/internal/ttscserver/ILSPPluginSelectionInputs.d.ts +61 -0
- package/lib/launcher/internal/ttscserver/ILSPPluginSelectionInputs.js +3 -0
- package/lib/launcher/internal/ttscserver/ILSPPluginSelectionInputs.js.map +1 -0
- package/lib/launcher/internal/ttscserver/LSPProjectInputDigest.d.ts +95 -0
- package/lib/launcher/internal/ttscserver/LSPProjectInputDigest.js +270 -0
- package/lib/launcher/internal/ttscserver/LSPProjectInputDigest.js.map +1 -0
- package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.d.ts +46 -0
- package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js +91 -0
- package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js.map +1 -0
- package/lib/launcher/internal/ttscserver/fingerprintInitialLSPProjectInputSnapshot.d.ts +21 -0
- package/lib/launcher/internal/ttscserver/fingerprintInitialLSPProjectInputSnapshot.js +39 -0
- package/lib/launcher/internal/ttscserver/fingerprintInitialLSPProjectInputSnapshot.js.map +1 -0
- package/lib/launcher/internal/ttscserver/initialLSPProjectInputSnapshotIsCurrent.d.ts +18 -0
- package/lib/launcher/internal/ttscserver/initialLSPProjectInputSnapshotIsCurrent.js +27 -0
- package/lib/launcher/internal/ttscserver/initialLSPProjectInputSnapshotIsCurrent.js.map +1 -0
- package/lib/launcher/internal/ttscserver/materializeLSPPluginManifest.d.ts +26 -0
- package/lib/launcher/internal/ttscserver/materializeLSPPluginManifest.js +62 -0
- package/lib/launcher/internal/ttscserver/materializeLSPPluginManifest.js.map +1 -0
- package/lib/launcher/internal/ttscserver/needsStdio.d.ts +17 -0
- package/lib/launcher/internal/ttscserver/needsStdio.js +36 -0
- package/lib/launcher/internal/ttscserver/needsStdio.js.map +1 -0
- package/lib/launcher/internal/ttscserver/runTtscserver.d.ts +25 -0
- package/lib/launcher/internal/ttscserver/runTtscserver.js +439 -0
- package/lib/launcher/internal/ttscserver/runTtscserver.js.map +1 -0
- package/lib/launcher/internal/watch/CompilerDirectoryWatchEventPlan.d.ts +29 -0
- package/lib/launcher/internal/watch/CompilerDirectoryWatchEventPlan.js +3 -0
- package/lib/launcher/internal/watch/CompilerDirectoryWatchEventPlan.js.map +1 -0
- package/lib/launcher/internal/watch/DirectoryWatcher.d.ts +44 -0
- package/lib/launcher/internal/watch/DirectoryWatcher.js +3 -0
- package/lib/launcher/internal/watch/DirectoryWatcher.js.map +1 -0
- package/lib/launcher/internal/watch/FseventsStreams.d.ts +87 -0
- package/lib/launcher/internal/watch/FseventsStreams.js +266 -0
- package/lib/launcher/internal/watch/FseventsStreams.js.map +1 -0
- package/lib/launcher/internal/watch/ProjectInputWatchRules.d.ts +92 -0
- package/lib/launcher/internal/watch/ProjectInputWatchRules.js +163 -0
- package/lib/launcher/internal/watch/ProjectInputWatchRules.js.map +1 -0
- package/lib/launcher/internal/watch/WatchInputChange.d.ts +29 -0
- package/lib/launcher/internal/watch/WatchInputChange.js +3 -0
- package/lib/launcher/internal/watch/WatchInputChange.js.map +1 -0
- package/lib/launcher/internal/watch/WatchPaths.d.ts +101 -0
- package/lib/launcher/internal/watch/WatchPaths.js +150 -0
- package/lib/launcher/internal/watch/WatchPaths.js.map +1 -0
- package/lib/launcher/internal/watch/WatchTopology.d.ts +384 -0
- package/lib/launcher/internal/{watchTopology.js → watch/WatchTopology.js} +726 -799
- package/lib/launcher/internal/watch/WatchTopology.js.map +1 -0
- package/lib/launcher/internal/watch/literalGlobRoot.d.ts +22 -0
- package/lib/launcher/internal/watch/literalGlobRoot.js +45 -0
- package/lib/launcher/internal/watch/literalGlobRoot.js.map +1 -0
- package/lib/launcher/internal/watch/planCompilerDirectoryWatchEvent.d.ts +40 -0
- package/lib/launcher/internal/watch/planCompilerDirectoryWatchEvent.js +69 -0
- package/lib/launcher/internal/watch/planCompilerDirectoryWatchEvent.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputActiveWatchDirectories.d.ts +19 -0
- package/lib/launcher/internal/watch/projectInputActiveWatchDirectories.js +52 -0
- package/lib/launcher/internal/watch/projectInputActiveWatchDirectories.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputAvailableWatchDirectory.d.ts +21 -0
- package/lib/launcher/internal/watch/projectInputAvailableWatchDirectory.js +55 -0
- package/lib/launcher/internal/watch/projectInputAvailableWatchDirectory.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputEventShouldNotify.d.ts +21 -0
- package/lib/launcher/internal/watch/projectInputEventShouldNotify.js +23 -0
- package/lib/launcher/internal/watch/projectInputEventShouldNotify.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputMembershipInvalidatesProgram.d.ts +27 -0
- package/lib/launcher/internal/watch/projectInputMembershipInvalidatesProgram.js +54 -0
- package/lib/launcher/internal/watch/projectInputMembershipInvalidatesProgram.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputReloadEventShouldNotify.d.ts +26 -0
- package/lib/launcher/internal/watch/projectInputReloadEventShouldNotify.js +100 -0
- package/lib/launcher/internal/watch/projectInputReloadEventShouldNotify.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputReplacementStrandsWatchers.d.ts +37 -0
- package/lib/launcher/internal/watch/projectInputReplacementStrandsWatchers.js +54 -0
- package/lib/launcher/internal/watch/projectInputReplacementStrandsWatchers.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputTopologyMayAffect.d.ts +23 -0
- package/lib/launcher/internal/watch/projectInputTopologyMayAffect.js +67 -0
- package/lib/launcher/internal/watch/projectInputTopologyMayAffect.js.map +1 -0
- package/lib/launcher/internal/watch/projectInputWatchDirectories.d.ts +22 -0
- package/lib/launcher/internal/watch/projectInputWatchDirectories.js +30 -0
- package/lib/launcher/internal/watch/projectInputWatchDirectories.js.map +1 -0
- package/lib/launcher/internal/watch/reloadInputsForFailedTopologyRefresh.d.ts +22 -0
- package/lib/launcher/internal/watch/reloadInputsForFailedTopologyRefresh.js +45 -0
- package/lib/launcher/internal/watch/reloadInputsForFailedTopologyRefresh.js.map +1 -0
- package/lib/launcher/internal/watch/syncWatchers.d.ts +25 -0
- package/lib/launcher/internal/watch/syncWatchers.js +61 -0
- package/lib/launcher/internal/watch/syncWatchers.js.map +1 -0
- package/lib/launcher/internal/watch/watchDirectory.d.ts +28 -0
- package/lib/launcher/internal/watch/watchDirectory.js +46 -0
- package/lib/launcher/internal/watch/watchDirectory.js.map +1 -0
- package/lib/launcher/internal/watch/watchDirectoryThroughFsWatch.d.ts +28 -0
- package/lib/launcher/internal/watch/watchDirectoryThroughFsWatch.js +38 -0
- package/lib/launcher/internal/watch/watchDirectoryThroughFsWatch.js.map +1 -0
- package/lib/launcher/ttscserver.js +1 -1
- package/lib/launcher/ttscserver.js.map +1 -1
- package/lib/launcher/ttsx.js +2 -3
- package/lib/launcher/ttsx.js.map +1 -1
- package/lib/plugin/CapabilityPluginResolver.d.ts +140 -0
- package/lib/plugin/CapabilityPluginResolver.js +400 -0
- package/lib/plugin/CapabilityPluginResolver.js.map +1 -0
- package/lib/plugin/ITtscCapabilityPlugin.d.ts +87 -0
- package/lib/plugin/ITtscCapabilityPlugin.js +3 -0
- package/lib/plugin/ITtscCapabilityPlugin.js.map +1 -0
- package/lib/plugin/internal/CapabilityPluginResult.d.ts +66 -0
- package/lib/plugin/internal/CapabilityPluginResult.js +86 -0
- package/lib/plugin/internal/CapabilityPluginResult.js.map +1 -0
- package/lib/plugin/internal/CapabilityResolutionFormat.d.ts +114 -0
- package/lib/plugin/internal/CapabilityResolutionFormat.js +229 -0
- package/lib/plugin/internal/CapabilityResolutionFormat.js.map +1 -0
- package/lib/plugin/internal/ITtscCapabilityPluginSource.d.ts +35 -0
- package/lib/plugin/internal/ITtscCapabilityPluginSource.js +3 -0
- package/lib/plugin/internal/ITtscCapabilityPluginSource.js.map +1 -0
- package/lib/plugin/internal/ITtscCapabilityResolutionEntry.d.ts +49 -0
- package/lib/plugin/internal/ITtscCapabilityResolutionEntry.js +3 -0
- package/lib/plugin/internal/ITtscCapabilityResolutionEntry.js.map +1 -0
- package/lib/plugin/internal/ITtscCapabilityResolutionPlugin.d.ts +21 -0
- package/lib/plugin/internal/ITtscCapabilityResolutionPlugin.js +3 -0
- package/lib/plugin/internal/ITtscCapabilityResolutionPlugin.js.map +1 -0
- package/lib/plugin/internal/capabilityPluginWorker.d.ts +1 -0
- package/lib/plugin/internal/capabilityPluginWorker.js +178 -0
- package/lib/plugin/internal/capabilityPluginWorker.js.map +1 -0
- package/lib/plugin/internal/decodeCapabilityCommandReply.d.ts +23 -0
- package/lib/plugin/internal/decodeCapabilityCommandReply.js +25 -0
- package/lib/plugin/internal/decodeCapabilityCommandReply.js.map +1 -0
- package/lib/plugin/internal/load/COMMONJS_PLUGIN_DESCRIPTOR_SHIM_SOURCE.d.ts +15 -0
- package/lib/plugin/internal/load/COMMONJS_PLUGIN_DESCRIPTOR_SHIM_SOURCE.js +182 -0
- package/lib/plugin/internal/load/COMMONJS_PLUGIN_DESCRIPTOR_SHIM_SOURCE.js.map +1 -0
- package/lib/plugin/internal/load/PLUGIN_DESCRIPTOR_SHIM_SOURCE.d.ts +11 -0
- package/lib/plugin/internal/load/PLUGIN_DESCRIPTOR_SHIM_SOURCE.js +62 -0
- package/lib/plugin/internal/load/PLUGIN_DESCRIPTOR_SHIM_SOURCE.js.map +1 -0
- package/lib/plugin/internal/load/PluginDescriptorAdmission.d.ts +46 -0
- package/lib/plugin/internal/load/PluginDescriptorAdmission.js +72 -0
- package/lib/plugin/internal/load/PluginDescriptorAdmission.js.map +1 -0
- package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.d.ts +154 -0
- package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js +317 -0
- package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js.map +1 -0
- package/lib/plugin/internal/load/PluginPackageResolution.d.ts +208 -0
- package/lib/plugin/internal/load/PluginPackageResolution.js +593 -0
- package/lib/plugin/internal/load/PluginPackageResolution.js.map +1 -0
- package/lib/plugin/internal/load/ProjectPluginEntries.d.ts +60 -0
- package/lib/plugin/internal/load/ProjectPluginEntries.js +164 -0
- package/lib/plugin/internal/load/ProjectPluginEntries.js.map +1 -0
- package/lib/plugin/internal/load/RESOLUTION_INPUT_RECORDER_PATH.d.ts +13 -0
- package/lib/plugin/internal/load/RESOLUTION_INPUT_RECORDER_PATH.js +21 -0
- package/lib/plugin/internal/load/RESOLUTION_INPUT_RECORDER_PATH.js.map +1 -0
- package/lib/plugin/internal/load/collectProjectHostInputs.d.ts +16 -0
- package/lib/plugin/internal/load/collectProjectHostInputs.js +66 -0
- package/lib/plugin/internal/load/collectProjectHostInputs.js.map +1 -0
- package/lib/plugin/internal/load/composePluginSources.d.ts +20 -0
- package/lib/plugin/internal/load/composePluginSources.js +95 -0
- package/lib/plugin/internal/load/composePluginSources.js.map +1 -0
- package/lib/plugin/internal/load/declaresHostInputReads.d.ts +24 -0
- package/lib/plugin/internal/load/declaresHostInputReads.js +48 -0
- package/lib/plugin/internal/load/declaresHostInputReads.js.map +1 -0
- package/lib/plugin/internal/load/hasProjectPluginEntries.d.ts +21 -0
- package/lib/plugin/internal/load/hasProjectPluginEntries.js +29 -0
- package/lib/plugin/internal/load/hasProjectPluginEntries.js.map +1 -0
- package/lib/plugin/internal/load/hashHostInputPaths.d.ts +17 -0
- package/lib/plugin/internal/load/hashHostInputPaths.js +46 -0
- package/lib/plugin/internal/load/hashHostInputPaths.js.map +1 -0
- package/lib/plugin/internal/load/isRelativePluginSpecifier.d.ts +22 -0
- package/lib/plugin/internal/load/isRelativePluginSpecifier.js +33 -0
- package/lib/plugin/internal/load/isRelativePluginSpecifier.js.map +1 -0
- package/lib/plugin/internal/load/loadProjectPlugins.d.ts +112 -0
- package/lib/plugin/internal/load/loadProjectPlugins.js +1640 -0
- package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -0
- package/lib/plugin/internal/load/moduleResolutionBaseSelects.d.ts +42 -0
- package/lib/plugin/internal/load/moduleResolutionBaseSelects.js +51 -0
- package/lib/plugin/internal/load/moduleResolutionBaseSelects.js.map +1 -0
- package/lib/plugin/internal/load/observeImportSearchRoots.d.ts +29 -0
- package/lib/plugin/internal/load/observeImportSearchRoots.js +38 -0
- package/lib/plugin/internal/load/observeImportSearchRoots.js.map +1 -0
- package/lib/plugin/internal/load/pluginLabel.d.ts +15 -0
- package/lib/plugin/internal/load/pluginLabel.js +25 -0
- package/lib/plugin/internal/load/pluginLabel.js.map +1 -0
- package/lib/plugin/internal/load/realpathHostInput.d.ts +14 -0
- package/lib/plugin/internal/load/realpathHostInput.js +29 -0
- package/lib/plugin/internal/load/realpathHostInput.js.map +1 -0
- package/lib/plugin/internal/load/realpathHostInputPaths.d.ts +17 -0
- package/lib/plugin/internal/load/realpathHostInputPaths.js +28 -0
- package/lib/plugin/internal/load/realpathHostInputPaths.js.map +1 -0
- package/lib/plugin/internal/load/rejectJsTransformFunctions.d.ts +13 -0
- package/lib/plugin/internal/load/rejectJsTransformFunctions.js +22 -0
- package/lib/plugin/internal/load/rejectJsTransformFunctions.js.map +1 -0
- package/lib/plugin/internal/load/requirePluginSource.d.ts +14 -0
- package/lib/plugin/internal/load/requirePluginSource.js +38 -0
- package/lib/plugin/internal/load/requirePluginSource.js.map +1 -0
- package/lib/plugin/internal/load/resolveNativeSource.d.ts +29 -0
- package/lib/plugin/internal/load/resolveNativeSource.js +37 -0
- package/lib/plugin/internal/load/resolveNativeSource.js.map +1 -0
- package/lib/plugin/internal/load/validatePluginContributors.d.ts +22 -0
- package/lib/plugin/internal/load/validatePluginContributors.js +86 -0
- package/lib/plugin/internal/load/validatePluginContributors.js.map +1 -0
- package/lib/plugin/internal/load/validatePluginSource.d.ts +14 -0
- package/lib/plugin/internal/load/validatePluginSource.js +21 -0
- package/lib/plugin/internal/load/validatePluginSource.js.map +1 -0
- package/lib/plugin/internal/load/visitImportMappedCandidates.d.ts +36 -0
- package/lib/plugin/internal/load/visitImportMappedCandidates.js +45 -0
- package/lib/plugin/internal/load/visitImportMappedCandidates.js.map +1 -0
- package/lib/plugin/internal/pluginDescriptorFailureReason.d.ts +23 -0
- package/lib/plugin/internal/pluginDescriptorFailureReason.js +43 -0
- package/lib/plugin/internal/pluginDescriptorFailureReason.js.map +1 -0
- package/lib/plugin/internal/pluginDescriptorProcessFailure.d.ts +28 -0
- package/lib/plugin/internal/pluginDescriptorProcessFailure.js +37 -0
- package/lib/plugin/internal/pluginDescriptorProcessFailure.js.map +1 -0
- package/lib/plugin/internal/readCapabilityResolution.d.ts +42 -0
- package/lib/plugin/internal/readCapabilityResolution.js +158 -0
- package/lib/plugin/internal/readCapabilityResolution.js.map +1 -0
- package/lib/plugin/internal/receiveCapabilityFailure.d.ts +21 -0
- package/lib/plugin/internal/receiveCapabilityFailure.js +28 -0
- package/lib/plugin/internal/receiveCapabilityFailure.js.map +1 -0
- package/lib/plugin/internal/source/CachePrunePolicy.d.ts +42 -0
- package/lib/plugin/internal/source/CachePrunePolicy.js +47 -0
- package/lib/plugin/internal/source/CachePrunePolicy.js.map +1 -0
- package/lib/plugin/internal/source/GoBuildCacheCoordination.d.ts +159 -0
- package/lib/plugin/internal/source/GoBuildCacheCoordination.js +475 -0
- package/lib/plugin/internal/source/GoBuildCacheCoordination.js.map +1 -0
- package/lib/plugin/internal/source/GoEnvironmentReading.d.ts +42 -0
- package/lib/plugin/internal/source/GoEnvironmentReading.js +110 -0
- package/lib/plugin/internal/source/GoEnvironmentReading.js.map +1 -0
- package/lib/plugin/internal/source/GoSourceInputs.d.ts +124 -0
- package/lib/plugin/internal/source/GoSourceInputs.js +180 -0
- package/lib/plugin/internal/source/GoSourceInputs.js.map +1 -0
- package/lib/plugin/internal/source/GoToolResolution.d.ts +125 -0
- package/lib/plugin/internal/source/GoToolResolution.js +278 -0
- package/lib/plugin/internal/source/GoToolResolution.js.map +1 -0
- package/lib/plugin/internal/source/IGoBuildCachePruneOptions.d.ts +30 -0
- package/lib/plugin/internal/source/IGoBuildCachePruneOptions.js +3 -0
- package/lib/plugin/internal/source/IGoBuildCachePruneOptions.js.map +1 -0
- package/lib/plugin/internal/source/IPluginCachePruneOptions.d.ts +33 -0
- package/lib/plugin/internal/source/IPluginCachePruneOptions.js +3 -0
- package/lib/plugin/internal/source/IPluginCachePruneOptions.js.map +1 -0
- package/lib/plugin/internal/source/IPluginModuleReplaceDirectory.d.ts +27 -0
- package/lib/plugin/internal/source/IPluginModuleReplaceDirectory.js +3 -0
- package/lib/plugin/internal/source/IPluginModuleReplaceDirectory.js.map +1 -0
- package/lib/plugin/internal/source/ITtscBuildContributor.d.ts +18 -0
- package/lib/plugin/internal/source/ITtscBuildContributor.js +3 -0
- package/lib/plugin/internal/source/ITtscBuildContributor.js.map +1 -0
- package/lib/plugin/internal/source/ITtscSourceBuildCachePaths.d.ts +25 -0
- package/lib/plugin/internal/source/ITtscSourceBuildCachePaths.js +3 -0
- package/lib/plugin/internal/source/ITtscSourceBuildCachePaths.js.map +1 -0
- package/lib/plugin/internal/source/NativeSourcePackages.d.ts +155 -0
- package/lib/plugin/internal/source/NativeSourcePackages.js +330 -0
- package/lib/plugin/internal/source/NativeSourcePackages.js.map +1 -0
- package/lib/plugin/internal/source/PluginBinaryUse.d.ts +66 -0
- package/lib/plugin/internal/source/PluginBinaryUse.js +163 -0
- package/lib/plugin/internal/source/PluginBinaryUse.js.map +1 -0
- package/lib/plugin/internal/source/PluginBinaryWaitResult.d.ts +34 -0
- package/lib/plugin/internal/source/PluginBinaryWaitResult.js +3 -0
- package/lib/plugin/internal/source/PluginBinaryWaitResult.js.map +1 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.d.ts +111 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js +243 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js.map +1 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.d.ts +130 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.js +215 -0
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.js.map +1 -0
- package/lib/plugin/internal/source/PluginBuildLockFence.d.ts +25 -0
- package/lib/plugin/internal/source/PluginBuildLockFence.js +3 -0
- package/lib/plugin/internal/source/PluginBuildLockFence.js.map +1 -0
- package/lib/plugin/internal/source/PluginBuildLockLease.d.ts +29 -0
- package/lib/plugin/internal/source/PluginBuildLockLease.js +3 -0
- package/lib/plugin/internal/source/PluginBuildLockLease.js.map +1 -0
- package/lib/plugin/internal/source/PluginBuildLockObservation.d.ts +42 -0
- package/lib/plugin/internal/source/PluginBuildLockObservation.js +3 -0
- package/lib/plugin/internal/source/PluginBuildLockObservation.js.map +1 -0
- package/lib/plugin/internal/source/PluginBuildLockOwner.d.ts +126 -0
- package/lib/plugin/internal/source/PluginBuildLockOwner.js +165 -0
- package/lib/plugin/internal/source/PluginBuildLockOwner.js.map +1 -0
- package/lib/plugin/internal/source/PluginBuildLockProtocol.d.ts +234 -0
- package/lib/plugin/internal/source/PluginBuildLockProtocol.js +287 -0
- package/lib/plugin/internal/source/PluginBuildLockProtocol.js.map +1 -0
- package/lib/plugin/internal/source/SourceBuildCacheLayout.d.ts +183 -0
- package/lib/plugin/internal/source/SourceBuildCacheLayout.js +291 -0
- package/lib/plugin/internal/source/SourceBuildCacheLayout.js.map +1 -0
- package/lib/plugin/internal/source/SourceBuildFilesystemOperations.d.ts +32 -0
- package/lib/plugin/internal/source/SourceBuildFilesystemOperations.js +3 -0
- package/lib/plugin/internal/source/SourceBuildFilesystemOperations.js.map +1 -0
- package/lib/plugin/internal/source/SourcePluginAdmission.d.ts +80 -0
- package/lib/plugin/internal/source/SourcePluginAdmission.js +114 -0
- package/lib/plugin/internal/source/SourcePluginAdmission.js.map +1 -0
- package/lib/plugin/internal/source/SourcePluginWorkspace.d.ts +153 -0
- package/lib/plugin/internal/source/SourcePluginWorkspace.js +394 -0
- package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -0
- package/lib/plugin/internal/source/acquirePluginBuildLock.d.ts +35 -0
- package/lib/plugin/internal/source/acquirePluginBuildLock.js +176 -0
- package/lib/plugin/internal/source/acquirePluginBuildLock.js.map +1 -0
- package/lib/plugin/internal/source/autoQuoteGoModToken.d.ts +24 -0
- package/lib/plugin/internal/source/autoQuoteGoModToken.js +110 -0
- package/lib/plugin/internal/source/autoQuoteGoModToken.js.map +1 -0
- package/lib/plugin/internal/source/buildSourcePlugin.d.ts +89 -0
- package/lib/plugin/internal/source/buildSourcePlugin.js +862 -0
- package/lib/plugin/internal/source/buildSourcePlugin.js.map +1 -0
- package/lib/plugin/internal/source/collectPluginSourceDirectories.d.ts +30 -0
- package/lib/plugin/internal/source/collectPluginSourceDirectories.js +77 -0
- package/lib/plugin/internal/source/collectPluginSourceDirectories.js.map +1 -0
- package/lib/plugin/internal/source/collectPluginSourceFiles.d.ts +40 -0
- package/lib/plugin/internal/source/collectPluginSourceFiles.js +95 -0
- package/lib/plugin/internal/source/collectPluginSourceFiles.js.map +1 -0
- package/lib/plugin/internal/source/computeCacheKey.d.ts +75 -0
- package/lib/plugin/internal/source/computeCacheKey.js +122 -0
- package/lib/plugin/internal/source/computeCacheKey.js.map +1 -0
- package/lib/plugin/internal/source/copiesPluginSourceEntry.d.ts +33 -0
- package/lib/plugin/internal/source/copiesPluginSourceEntry.js +57 -0
- package/lib/plugin/internal/source/copiesPluginSourceEntry.js.map +1 -0
- package/lib/plugin/internal/source/createExternalSourceSnapshotLayout.d.ts +22 -0
- package/lib/plugin/internal/source/createExternalSourceSnapshotLayout.js +60 -0
- package/lib/plugin/internal/source/createExternalSourceSnapshotLayout.js.map +1 -0
- package/lib/plugin/internal/source/ensureExecutableGoToolchain.d.ts +25 -0
- package/lib/plugin/internal/source/ensureExecutableGoToolchain.js +96 -0
- package/lib/plugin/internal/source/ensureExecutableGoToolchain.js.map +1 -0
- package/lib/plugin/internal/source/formatDuration.d.ts +18 -0
- package/lib/plugin/internal/source/formatDuration.js +36 -0
- package/lib/plugin/internal/source/formatDuration.js.map +1 -0
- package/lib/plugin/internal/source/formatGoWorkPath.d.ts +35 -0
- package/lib/plugin/internal/source/formatGoWorkPath.js +42 -0
- package/lib/plugin/internal/source/formatGoWorkPath.js.map +1 -0
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.d.ts +47 -0
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js +597 -0
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js.map +1 -0
- package/lib/plugin/internal/source/inspectPluginBuildLock.d.ts +29 -0
- package/lib/plugin/internal/source/inspectPluginBuildLock.js +285 -0
- package/lib/plugin/internal/source/inspectPluginBuildLock.js.map +1 -0
- package/lib/plugin/internal/source/isPathWithin.d.ts +16 -0
- package/lib/plugin/internal/source/isPathWithin.js +28 -0
- package/lib/plugin/internal/source/isPathWithin.js.map +1 -0
- package/lib/plugin/internal/source/legacyGlobalCacheTargets.d.ts +24 -0
- package/lib/plugin/internal/source/legacyGlobalCacheTargets.js +60 -0
- package/lib/plugin/internal/source/legacyGlobalCacheTargets.js.map +1 -0
- package/lib/plugin/internal/source/pluginBuildEnvironment.d.ts +31 -0
- package/lib/plugin/internal/source/pluginBuildEnvironment.js +47 -0
- package/lib/plugin/internal/source/pluginBuildEnvironment.js.map +1 -0
- package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.d.ts +1 -0
- package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js +24 -0
- package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js.map +1 -0
- package/lib/plugin/internal/source/pluginBuildVersions.d.ts +31 -0
- package/lib/plugin/internal/source/pluginBuildVersions.js +65 -0
- package/lib/plugin/internal/source/pluginBuildVersions.js.map +1 -0
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.d.ts +41 -0
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js +74 -0
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js.map +1 -0
- package/lib/plugin/internal/source/pluginSourceCovers.d.ts +32 -0
- package/lib/plugin/internal/source/pluginSourceCovers.js +54 -0
- package/lib/plugin/internal/source/pluginSourceCovers.js.map +1 -0
- package/lib/plugin/internal/source/pluginSourceDigest.d.ts +40 -0
- package/lib/plugin/internal/source/pluginSourceDigest.js +60 -0
- package/lib/plugin/internal/source/pluginSourceDigest.js.map +1 -0
- package/lib/plugin/internal/source/pluginSourceFilesSignature.d.ts +38 -0
- package/lib/plugin/internal/source/pluginSourceFilesSignature.js +53 -0
- package/lib/plugin/internal/source/pluginSourceFilesSignature.js.map +1 -0
- package/lib/plugin/internal/source/pluginSourceState.d.ts +47 -0
- package/lib/plugin/internal/source/pluginSourceState.js +63 -0
- package/lib/plugin/internal/source/pluginSourceState.js.map +1 -0
- package/lib/plugin/internal/source/pluginSourceStateHolds.d.ts +34 -0
- package/lib/plugin/internal/source/pluginSourceStateHolds.js +45 -0
- package/lib/plugin/internal/source/pluginSourceStateHolds.js.map +1 -0
- package/lib/plugin/internal/source/processPluginBuildEnvironment.d.ts +33 -0
- package/lib/plugin/internal/source/processPluginBuildEnvironment.js +40 -0
- package/lib/plugin/internal/source/processPluginBuildEnvironment.js.map +1 -0
- package/lib/plugin/internal/source/pruneCacheFileRoot.d.ts +34 -0
- package/lib/plugin/internal/source/pruneCacheFileRoot.js +120 -0
- package/lib/plugin/internal/source/pruneCacheFileRoot.js.map +1 -0
- package/lib/plugin/internal/source/pruneGoBuildCacheRoot.d.ts +28 -0
- package/lib/plugin/internal/source/pruneGoBuildCacheRoot.js +185 -0
- package/lib/plugin/internal/source/pruneGoBuildCacheRoot.js.map +1 -0
- package/lib/plugin/internal/source/prunePluginCacheRoot.d.ts +46 -0
- package/lib/plugin/internal/source/prunePluginCacheRoot.js +446 -0
- package/lib/plugin/internal/source/prunePluginCacheRoot.js.map +1 -0
- package/lib/plugin/internal/source/prunesPluginSourceDirectory.d.ts +21 -0
- package/lib/plugin/internal/source/prunesPluginSourceDirectory.js +28 -0
- package/lib/plugin/internal/source/prunesPluginSourceDirectory.js.map +1 -0
- package/lib/plugin/internal/source/reclaimPluginBuildLock.d.ts +23 -0
- package/lib/plugin/internal/source/reclaimPluginBuildLock.js +48 -0
- package/lib/plugin/internal/source/reclaimPluginBuildLock.js.map +1 -0
- package/lib/plugin/internal/source/recordCacheFileUse.d.ts +22 -0
- package/lib/plugin/internal/source/recordCacheFileUse.js +43 -0
- package/lib/plugin/internal/source/recordCacheFileUse.js.map +1 -0
- package/lib/plugin/internal/source/releasePluginBuildLock.d.ts +33 -0
- package/lib/plugin/internal/source/releasePluginBuildLock.js +100 -0
- package/lib/plugin/internal/source/releasePluginBuildLock.js.map +1 -0
- package/lib/plugin/internal/source/resolveCleanTargets.d.ts +26 -0
- package/lib/plugin/internal/source/resolveCleanTargets.js +73 -0
- package/lib/plugin/internal/source/resolveCleanTargets.js.map +1 -0
- package/lib/plugin/internal/source/resolveGoCompiler.d.ts +29 -0
- package/lib/plugin/internal/source/resolveGoCompiler.js +62 -0
- package/lib/plugin/internal/source/resolveGoCompiler.js.map +1 -0
- package/lib/plugin/internal/source/resolvePluginCacheRoot.d.ts +21 -0
- package/lib/plugin/internal/source/resolvePluginCacheRoot.js +31 -0
- package/lib/plugin/internal/source/resolvePluginCacheRoot.js.map +1 -0
- package/lib/plugin/internal/source/resolvePluginGoModule.d.ts +34 -0
- package/lib/plugin/internal/source/resolvePluginGoModule.js +65 -0
- package/lib/plugin/internal/source/resolvePluginGoModule.js.map +1 -0
- package/lib/plugin/internal/source/resolveSourceBuildCachePaths.d.ts +21 -0
- package/lib/plugin/internal/source/resolveSourceBuildCachePaths.js +236 -0
- package/lib/plugin/internal/source/resolveSourceBuildCachePaths.js.map +1 -0
- package/lib/plugin/internal/source/selectPluginModuleReplaceDirectories.d.ts +29 -0
- package/lib/plugin/internal/source/selectPluginModuleReplaceDirectories.js +68 -0
- package/lib/plugin/internal/source/selectPluginModuleReplaceDirectories.js.map +1 -0
- package/lib/plugin/internal/source/spawnGoTool.d.ts +22 -0
- package/lib/plugin/internal/source/spawnGoTool.js +164 -0
- package/lib/plugin/internal/source/spawnGoTool.js.map +1 -0
- package/lib/plugin/internal/source/touchPluginCacheEntryInUse.d.ts +27 -0
- package/lib/plugin/internal/source/touchPluginCacheEntryInUse.js +48 -0
- package/lib/plugin/internal/source/touchPluginCacheEntryInUse.js.map +1 -0
- package/lib/plugin/internal/source/waitForPluginBinary.d.ts +36 -0
- package/lib/plugin/internal/source/waitForPluginBinary.js +94 -0
- package/lib/plugin/internal/source/waitForPluginBinary.js.map +1 -0
- package/lib/plugin/internal/source/windowsGoCommandArgs.d.ts +17 -0
- package/lib/plugin/internal/source/windowsGoCommandArgs.js +23 -0
- package/lib/plugin/internal/source/windowsGoCommandArgs.js.map +1 -0
- package/lib/plugin/internal/source/withGoBuildCacheLease.d.ts +37 -0
- package/lib/plugin/internal/source/withGoBuildCacheLease.js +87 -0
- package/lib/plugin/internal/source/withGoBuildCacheLease.js.map +1 -0
- package/lib/plugin/internal/writeCapabilityResolution.d.ts +80 -0
- package/lib/plugin/internal/writeCapabilityResolution.js +196 -0
- package/lib/plugin/internal/writeCapabilityResolution.js.map +1 -0
- package/lib/plugin/resolveCapabilityPlugins.d.ts +53 -32
- package/lib/plugin/resolveCapabilityPlugins.js +209 -38
- package/lib/plugin/resolveCapabilityPlugins.js.map +1 -1
- package/lib/register.js +20 -5
- package/lib/register.js.map +1 -1
- package/lib/structures/ITtscCompilerContext.d.ts +29 -11
- package/lib/structures/ITtscCompilerDiagnostic.d.ts +24 -7
- package/lib/structures/ITtscCompilerResult.d.ts +75 -25
- package/lib/structures/ITtscCompilerTransformation.d.ts +287 -64
- package/lib/structures/ITtscPlugin.d.ts +24 -8
- package/lib/structures/ITtscPluginCapabilities.d.ts +55 -5
- package/lib/structures/ITtscPluginContributor.d.ts +19 -8
- package/lib/structures/ITtscPluginFactoryContext.d.ts +12 -3
- package/lib/structures/ITtscProjectPluginConfig.d.ts +35 -10
- package/lib/structures/TtscPluginStage.d.ts +9 -0
- package/lib/structures/internal/ITtscLoadedNativePlugin.d.ts +19 -5
- package/lib/structures/internal/ITtscParsedProjectConfig.d.ts +29 -3
- package/lib/structures/internal/ITtscProjectIdentity.d.ts +21 -6
- package/lib/structures/internal/ITtscProjectInputSnapshot.d.ts +23 -8
- package/lib/structures/internal/ITtscProjectLocatorOptions.d.ts +18 -4
- package/lib/structures/internal/TtscBuildOptions.d.ts +33 -14
- package/lib/structures/internal/TtscBuildResult.d.ts +63 -4
- package/lib/structures/internal/TtscCommonOptions.d.ts +47 -14
- package/lib/structures/internal/TtscSingleFileEmitOptions.d.ts +46 -5
- package/package.json +26 -12
- package/shim/ast/enums_gen.go +4 -2
- package/shim/ast/go.mod +5 -5
- package/shim/ast/go.sum +10 -10
- package/shim/ast/lint.go +1088 -20
- package/shim/ast/parent.go +38 -22
- package/shim/ast/safe_text.go +48 -26
- package/shim/ast/shim.go +1307 -20
- package/shim/ast/test/next_jsdoc_comment_location_reaches_variable_statement_test.go +51 -0
- package/shim/ast/test/node_text_joins_multi_hop_qualified_name_test.go +24 -9
- package/shim/ast/test/node_text_joins_one_hop_qualified_name_test.go +9 -5
- package/shim/ast/test/node_text_returns_empty_for_nil_test.go +13 -5
- package/shim/ast/test/node_text_returns_identifier_text_test.go +12 -5
- package/shim/ast/test/node_text_skips_empty_qualified_left_test.go +35 -5
- package/shim/astnav/go.mod +5 -5
- package/shim/astnav/go.sum +12 -10
- package/shim/astnav/shim.go +9 -0
- package/shim/bundled/go.mod +7 -1
- package/shim/bundled/go.sum +12 -0
- package/shim/checker/enums_gen.go +4 -2
- package/shim/checker/extra-shim.json +6 -0
- package/shim/checker/go.mod +5 -5
- package/shim/checker/go.sum +10 -10
- package/shim/checker/node_builder_fields_gen.go +19 -0
- package/shim/checker/shim.go +827 -114
- package/shim/compiler/emit_sourcemap.go +68 -29
- package/shim/compiler/emitassemble.go +36 -2
- package/shim/compiler/emithook.go +13 -3
- package/shim/compiler/go.mod +5 -5
- package/shim/compiler/go.sum +10 -10
- package/shim/compiler/incremental.go +56 -20
- package/shim/compiler/resolution.go +92 -9
- package/shim/core/enums_gen.go +2 -2
- package/shim/core/go.mod +6 -1
- package/shim/core/go.sum +10 -0
- package/shim/core/modulekind.go +9 -0
- package/shim/core/shim.go +157 -6
- package/shim/diagnosticwriter/go.mod +10 -1
- package/shim/diagnosticwriter/go.sum +20 -0
- package/shim/diagnosticwriter/lint.go +188 -10
- package/shim/diagnosticwriter/shim.go +14 -0
- package/shim/lsp/go.mod +5 -5
- package/shim/lsp/go.sum +10 -10
- package/shim/lsp/shim.go +78 -2
- package/shim/parser/go.mod +10 -1
- package/shim/parser/go.sum +22 -0
- package/shim/printer/emithost.go +46 -1
- package/shim/printer/go.mod +5 -5
- package/shim/printer/go.sum +10 -10
- package/shim/printer/shim.go +114 -7
- package/shim/printer/sourcemap.go +55 -0
- package/shim/scanner/go.mod +10 -1
- package/shim/scanner/go.sum +20 -0
- package/shim/scanner/regexp.go +19 -4
- package/shim/scanner/shim.go +3 -0
- package/shim/stringutil/extra-shim.json +1 -0
- package/shim/stringutil/go.mod +5 -0
- package/shim/stringutil/go.sum +2 -0
- package/shim/stringutil/shim.go +119 -0
- package/shim/transformers/go.mod +5 -5
- package/shim/transformers/go.sum +12 -10
- package/shim/transformers/shim.go +12 -3
- package/shim/tsoptions/command_line_raw.go +44 -0
- package/shim/tsoptions/go.mod +10 -1
- package/shim/tsoptions/go.sum +22 -0
- package/shim/tsoptions/shim.go +1 -1
- package/shim/tspath/go.mod +1 -1
- package/shim/tspath/go.sum +6 -0
- package/shim/vfs/cachedvfs/go.mod +3 -1
- package/shim/vfs/cachedvfs/go.sum +12 -0
- package/shim/vfs/decode.go +26 -0
- package/shim/vfs/decode_test.go +42 -0
- package/shim/vfs/go.mod +7 -1
- package/shim/vfs/go.sum +12 -0
- package/shim/vfs/osvfs/go.mod +7 -1
- package/shim/vfs/osvfs/go.sum +12 -0
- package/src/TtscCompiler.ts +223 -234
- package/src/TtscService.ts +87 -31
- package/src/TtscServiceRequestOptions.ts +21 -0
- package/src/compiler/internal/CapturedProcessOutput.ts +69 -0
- package/src/compiler/internal/CompilerArgumentsInspection.ts +184 -0
- package/src/compiler/internal/EmitOwnershipIndex.ts +254 -0
- package/src/compiler/internal/PrivateCompilerOutput.ts +330 -0
- package/src/compiler/internal/ResidentCheckProcess.ts +445 -0
- package/src/compiler/internal/ResidentCheckProcessOptions.ts +32 -0
- package/src/compiler/internal/ResidentCheckRequest.ts +39 -0
- package/src/compiler/internal/ResidentCheckResult.ts +24 -0
- package/src/compiler/internal/ResidentCheckTelemetry.ts +36 -0
- package/src/compiler/internal/ResidentReplyKind.ts +18 -0
- package/src/compiler/internal/ResidentTransformProcess.ts +299 -0
- package/src/compiler/internal/ResidentTransformProcessOptions.ts +30 -0
- package/src/compiler/internal/ResidentTransformReply.ts +79 -0
- package/src/compiler/internal/ResidentTransformRequestOptions.ts +16 -0
- package/src/compiler/internal/ResidentTransformRequests.ts +198 -0
- package/src/compiler/internal/StartedResidentTransform.ts +29 -0
- package/src/compiler/internal/TransformProjectWorkerReply.ts +37 -0
- package/src/compiler/internal/TransformProjectWorkerRequest.ts +42 -0
- package/src/compiler/internal/build/BuildExecution.ts +1261 -0
- package/src/compiler/internal/build/BuildTiming.ts +145 -0
- package/src/compiler/internal/build/CompilerDiagnostics.ts +307 -0
- package/src/compiler/internal/build/NativePluginArguments.ts +302 -0
- package/src/compiler/internal/build/PassthroughFlags.ts +229 -0
- package/src/compiler/internal/build/PluginFailureDiagnostics.ts +70 -0
- package/src/compiler/internal/build/ResidentCheckEntryPlan.ts +42 -0
- package/src/compiler/internal/build/ResidentCheckWatchChange.ts +33 -0
- package/src/compiler/internal/build/ResidentCheckWatchSession.ts +501 -0
- package/src/compiler/internal/build/RunBuildOptions.ts +145 -0
- package/src/compiler/internal/build/TsgoArguments.ts +349 -0
- package/src/compiler/internal/build/appendBuildOutput.ts +218 -0
- package/src/compiler/internal/build/bufferResidentCheckEntryRequests.ts +52 -0
- package/src/compiler/internal/build/createProcessDiagnostic.ts +32 -0
- package/src/compiler/internal/build/isAbsoluteLocalProjectInputPath.ts +55 -0
- package/src/compiler/internal/build/mergeProjectInputSnapshots.ts +147 -0
- package/src/compiler/internal/build/normalizeBuildOutput.ts +89 -0
- package/src/compiler/internal/build/parseProjectInputSnapshot.ts +91 -0
- package/src/compiler/internal/build/planResidentCheckEntries.ts +55 -0
- package/src/compiler/internal/build/privateRuntimeRootDir.ts +33 -0
- package/src/compiler/internal/build/residentCheckRequest.ts +41 -0
- package/src/compiler/internal/build/runBuild.ts +61 -0
- package/src/compiler/internal/build/runExternalEmitProvenance.ts +566 -0
- package/src/compiler/internal/build/takeResidentCheckEntryRequest.ts +31 -0
- package/src/compiler/internal/buildNativeCompiler.ts +19 -2
- package/src/compiler/internal/captureProcessOutput.ts +37 -39
- package/src/compiler/internal/compileProjectInMemory.ts +139 -92
- package/src/compiler/internal/ensureExecutable.ts +32 -0
- package/src/compiler/internal/findNearestGoMod.ts +43 -0
- package/src/compiler/internal/isOutsideRelativePath.ts +26 -0
- package/src/compiler/internal/outputText.ts +21 -0
- package/src/compiler/internal/packageRootDir.ts +43 -0
- package/src/compiler/internal/parseNativeTransformOutput.ts +722 -0
- package/src/compiler/internal/project/CompilerProjectSelection.ts +204 -0
- package/src/compiler/internal/project/ConfigJsonText.ts +55 -0
- package/src/compiler/internal/project/compilerUsesCaseSensitiveFileNames.ts +124 -0
- package/src/compiler/internal/project/createNativeProjectContextArgs.ts +14 -19
- package/src/compiler/internal/project/createNativeProjectContextJson.ts +28 -0
- package/src/compiler/internal/project/parseJsonc.ts +318 -0
- package/src/compiler/internal/project/readJsonFile.ts +34 -0
- package/src/compiler/internal/project/readJsoncFile.ts +46 -0
- package/src/compiler/internal/project/readProjectConfig.ts +137 -200
- package/src/compiler/internal/project/resolveOwningProjectConfig.ts +278 -0
- package/src/compiler/internal/project/resolveProjectConfig.ts +18 -127
- package/src/compiler/internal/project/resolveProjectIdentity.ts +153 -0
- package/src/compiler/internal/project/resolveTsconfigExtends.ts +175 -0
- package/src/compiler/internal/project/selectReferencedProject.ts +54 -0
- package/src/compiler/internal/project/tsconfigExtendsFileCandidates.ts +54 -0
- package/src/compiler/internal/readEffectiveCompilerOptions.ts +126 -0
- package/src/compiler/internal/resolveBinary.ts +25 -9
- package/src/compiler/internal/resolveTsgo.ts +31 -11
- package/src/compiler/internal/runNativeCheckWithObservations.ts +211 -0
- package/src/compiler/internal/runSingleFileEmit.ts +92 -27
- package/src/compiler/internal/sharedHost/SEMANTIC_CONFIG_PATH_ENV.ts +2 -0
- package/src/compiler/internal/sharedHost/SidecarEnvironment.ts +151 -0
- package/src/compiler/internal/sharedHost/TSGO_ARGS_CWD_ENV.ts +7 -0
- package/src/compiler/internal/sharedHost/TSGO_ARGS_ENV.ts +7 -0
- package/src/compiler/internal/sharedHost/assertSharedHostCompatibility.ts +48 -0
- package/src/compiler/internal/sharedHost/clearInheritedSemanticConfigPath.ts +27 -0
- package/src/compiler/internal/sharedHost/clearInheritedTsgoArgs.ts +41 -0
- package/src/compiler/internal/sharedHost/inheritedSidecarEnv.ts +45 -0
- package/src/compiler/internal/sharedHost/isLinkedTransform.ts +19 -0
- package/src/compiler/internal/sharedHost/linkedTransformPlugins.ts +25 -0
- package/src/compiler/internal/sharedHost/publishLinkedTransformPlugins.ts +42 -0
- package/src/compiler/internal/sharedHost/resolvePluginConfigDir.ts +33 -0
- package/src/compiler/internal/sharedHost/selectSharedHostPlugin.ts +35 -0
- package/src/compiler/internal/spawnNative.ts +16 -39
- package/src/compiler/internal/startResidentTransform.ts +66 -53
- package/src/compiler/internal/transformProjectInMemory.ts +347 -635
- package/src/compiler/internal/transformProjectInWorker.ts +170 -0
- package/src/compiler/internal/transformProjectWorker.ts +43 -0
- package/src/flags/AnySubcommand.ts +19 -0
- package/src/flags/COMPILER_ENUM_WHITESPACE.ts +35 -0
- package/src/flags/COMPILER_OPTIONS.ts +512 -0
- package/src/flags/COMPILER_OPTION_ASCII_FOLDS.ts +13 -0
- package/src/flags/COMPILER_OPTION_KINDS.ts +14 -0
- package/src/flags/CompilerOptionSpec.ts +30 -0
- package/src/flags/FLAG_BY_TOKEN.ts +40 -0
- package/src/flags/{schema.ts → FLAG_SCHEMA.ts} +43 -318
- package/src/flags/FlagKind.ts +22 -0
- package/src/flags/FlagLayer.ts +24 -0
- package/src/flags/FlagSpec.ts +118 -0
- package/src/flags/ParseOptions.ts +103 -0
- package/src/flags/ParseResult.ts +44 -0
- package/src/flags/TtscSubcommand.ts +22 -0
- package/src/flags/TtsxSubcommand.ts +13 -0
- package/src/flags/ValueValidator.ts +14 -0
- package/src/flags/buildGoAllowList.ts +43 -0
- package/src/flags/flagsForSubcommand.ts +22 -0
- package/src/flags/getBoolean.ts +27 -0
- package/src/flags/getNumber.ts +24 -0
- package/src/flags/getString.ts +24 -0
- package/src/flags/getStringList.ts +24 -0
- package/src/flags/normalizeCompilerEnumValue.ts +41 -0
- package/src/flags/normalizeFlagToken.ts +38 -0
- package/src/flags/parseFlags.ts +371 -0
- package/src/flags/readCompilerOptionOccurrence.ts +107 -0
- package/src/flags/readCompilerOptionValues.ts +68 -0
- package/src/flags/resolveFlagSpec.ts +29 -0
- package/src/index.ts +9 -3
- package/src/internal/CanonicalTempDirectoryOperations.ts +73 -0
- package/src/internal/CompilerContextSnapshot.ts +139 -0
- package/src/internal/CompilerResultAdapter.ts +320 -0
- package/src/internal/E2ETrace.ts +674 -0
- package/src/internal/IJavaScriptRuntimeCapabilities.ts +50 -0
- package/src/internal/OwnedNativeProcess.ts +417 -0
- package/src/internal/OwnedSynchronousProcess.ts +220 -0
- package/src/internal/RetireLockDirectoryOperations.ts +81 -0
- package/src/internal/SafeCacheCleanupTarget.ts +41 -0
- package/src/internal/SourceNativeRetirement.ts +1109 -0
- package/src/internal/SpawnSyncOutputFiles.ts +29 -0
- package/src/internal/cacheEntryExists.ts +24 -0
- package/src/internal/createCanonicalTempDirectory.ts +35 -18
- package/src/internal/isContendedCandidateRename.ts +35 -0
- package/src/internal/isSpawnSyncFdExhaustion.ts +19 -0
- package/src/internal/javascriptRuntimeCapabilities.ts +166 -0
- package/src/internal/nativeBinary.ts +11 -0
- package/src/internal/parseWindowsDirectoryCaseSensitivity.ts +50 -0
- package/src/internal/pathIdentity/FilesystemPathIdentity.ts +44 -0
- package/src/internal/pathIdentity/FilesystemPathIdentityContext.ts +182 -0
- package/src/internal/pathIdentity/FilesystemPathIdentityOperations.ts +106 -0
- package/src/internal/pathIdentity/ProjectInputPathIdentity.ts +21 -0
- package/src/internal/pathIdentity/ProjectInputPathIdentityContext.ts +21 -0
- package/src/internal/pathIdentity/ProjectInputPathIdentityOperations.ts +22 -0
- package/src/internal/pathIdentity/createFilesystemPathIdentityContext.ts +437 -0
- package/src/internal/pathIdentity/createProjectInputPathIdentityContext.ts +34 -0
- package/src/internal/pathIdentity/isFilesystemPathIdentityWithin.ts +32 -0
- package/src/internal/pathIdentity/isProjectInputPathIdentityWithin.ts +22 -0
- package/src/internal/pathIdentity/resolveFilesystemPath.ts +43 -0
- package/src/internal/pathIdentity/resolvePhysicalPath.ts +31 -0
- package/src/internal/pathIdentity/resolveProjectInputPath.ts +18 -0
- package/src/internal/pluginSource.ts +26 -0
- package/src/internal/projectInputPathIdentity.ts +26 -387
- package/src/internal/resolveNodeBinary.ts +13 -165
- package/src/internal/resolveSafeCacheCleanupTargets.ts +51 -19
- package/src/internal/restoreCompilerError.ts +175 -0
- package/src/internal/retireLockDirectory.ts +166 -0
- package/src/internal/runHoldingLock.ts +55 -0
- package/src/internal/runtimeExecutableIdentity.ts +212 -0
- package/src/internal/serializeCompilerError.ts +145 -0
- package/src/internal/spawnSyncResilient.ts +36 -182
- package/src/internal/spawnSyncWithLowDescriptors.ts +227 -0
- package/src/internal/tsconfig.ts +16 -0
- package/src/launcher/internal/PendingResidentCheckWatchChanges.ts +94 -0
- package/src/launcher/internal/TtscBuildMode.ts +14 -0
- package/src/launcher/internal/TtsxEntryOptions.ts +92 -0
- package/src/launcher/internal/assertNoSolutionBuild.ts +17 -10
- package/src/launcher/internal/assertTtsxNoWatch.ts +49 -0
- package/src/launcher/internal/buildSingleRootProject.ts +303 -0
- package/src/launcher/internal/getCompilerVersionText.ts +20 -5
- package/src/launcher/internal/inlineServedSourceMap.ts +294 -0
- package/src/launcher/internal/linkVirtualEntry.ts +88 -0
- package/src/launcher/internal/{commonJsExportMetadata.ts → parseCommonJsExports.ts} +12 -2
- package/src/launcher/internal/parseTtscBuildArgs.ts +103 -0
- package/src/launcher/internal/parseTtsxCLI.ts +183 -0
- package/src/launcher/internal/prepareExecution.ts +474 -362
- package/src/launcher/internal/prepareTtscBuildMode.ts +64 -0
- package/src/launcher/internal/resolveCacheDir.ts +12 -3
- package/src/launcher/internal/resolveSingleFileOutput.ts +145 -0
- package/src/launcher/internal/resolveTtscserverBinary.ts +20 -5
- package/src/launcher/internal/runTtsc.ts +394 -326
- package/src/launcher/internal/runTtsx.ts +349 -151
- package/src/launcher/internal/runtime/CommonJsRuntimeSource.ts +365 -0
- package/src/launcher/internal/runtime/DependencyBuildAdmission.ts +159 -0
- package/src/launcher/internal/runtime/DependencyBuildGeneration.ts +236 -0
- package/src/launcher/internal/runtime/DependencyBuildLockFence.ts +22 -0
- package/src/launcher/internal/runtime/DependencyBuildLockLease.ts +22 -0
- package/src/launcher/internal/runtime/DependencyBuildLockObservation.ts +49 -0
- package/src/launcher/internal/runtime/DependencyBuildLockProtocol.ts +137 -0
- package/src/launcher/internal/runtime/OwnedProjectSource.ts +140 -0
- package/src/launcher/internal/runtime/OwningModuleOptions.ts +22 -0
- package/src/launcher/internal/runtime/PluginDescriptorInputObservation.ts +112 -0
- package/src/launcher/internal/runtime/ProcessOwnedDirectory.ts +325 -0
- package/src/launcher/internal/runtime/ResolveResult.ts +26 -0
- package/src/launcher/internal/runtime/RuntimeEmitProvenance.ts +58 -0
- package/src/launcher/internal/runtime/RuntimeEntryPreparer.ts +23 -0
- package/src/launcher/internal/runtime/RuntimeFilesystem.ts +64 -0
- package/src/launcher/internal/runtime/RuntimeHookOptions.ts +23 -0
- package/src/launcher/internal/runtime/RuntimeIsolatedEmit.ts +88 -0
- package/src/launcher/internal/runtime/RuntimeLoaderCapabilities.ts +256 -0
- package/src/launcher/internal/runtime/RuntimeManifest.ts +77 -0
- package/src/launcher/internal/runtime/RuntimeManifestRegistry.ts +309 -0
- package/src/launcher/internal/runtime/RuntimeModuleFormat.ts +275 -0
- package/src/launcher/internal/runtime/RuntimeProjectOwnership.ts +139 -0
- package/src/launcher/internal/runtime/TTSX_MINIMUM_NODE_VERSION.ts +11 -0
- package/src/launcher/internal/runtime/acquireDependencyBuildLock.ts +97 -0
- package/src/launcher/internal/runtime/checkNodeRuntimeSupport.ts +94 -0
- package/src/launcher/internal/runtime/claimRuntimeProjectDirectory.ts +54 -0
- package/src/launcher/internal/runtime/commonJsExportNames.ts +57 -0
- package/src/launcher/internal/runtime/commonJsImportFacade.ts +62 -0
- package/src/launcher/internal/runtime/dependencyCacheKey.ts +82 -0
- package/src/launcher/internal/runtime/dependencyCacheRoot.ts +112 -0
- package/src/launcher/internal/runtime/inspectDependencyBuildLock.ts +162 -0
- package/src/launcher/internal/runtime/installRuntimeHooks.ts +2442 -0
- package/src/launcher/internal/runtime/interopProbe.ts +8 -0
- package/src/launcher/internal/runtime/isLocalProcessGone.ts +67 -0
- package/src/launcher/internal/runtime/observeMappedDescriptorResolution.ts +74 -0
- package/src/launcher/internal/runtime/projectModuleOptions.ts +28 -0
- package/src/launcher/internal/runtime/readDependencyCache.ts +89 -0
- package/src/launcher/internal/runtime/realPath.ts +30 -0
- package/src/launcher/internal/runtime/reclaimDependencyBuildLock.ts +27 -0
- package/src/launcher/internal/runtime/releaseDependencyBuildLock.ts +27 -0
- package/src/launcher/internal/runtime/resolveRuntimeCleanTargets.ts +93 -0
- package/src/launcher/internal/runtime/restoreStrippedNodeBuiltinScheme.ts +32 -0
- package/src/launcher/internal/runtime/runtimeRunKey.ts +31 -0
- package/src/launcher/internal/runtime/selectRuntimePluginPolicy.ts +28 -0
- package/src/launcher/internal/runtime/withRuntimeDirectoryLock.ts +92 -0
- package/src/launcher/internal/runtimeCompilerArgs.ts +91 -62
- package/src/launcher/internal/runtimeEmitProfile.ts +70 -0
- package/src/launcher/internal/runtimeHookPreload.ts +3 -3
- package/src/launcher/internal/runtimeOwnerPreload.ts +43 -0
- package/src/launcher/internal/singleRootProjectConfig.ts +38 -0
- package/src/launcher/internal/ttscserver/ILSPPluginSelectionInputs.ts +65 -0
- package/src/launcher/internal/ttscserver/LSPProjectInputDigest.ts +331 -0
- package/src/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.ts +107 -0
- package/src/launcher/internal/ttscserver/fingerprintInitialLSPProjectInputSnapshot.ts +41 -0
- package/src/launcher/internal/ttscserver/initialLSPProjectInputSnapshotIsCurrent.ts +36 -0
- package/src/launcher/internal/ttscserver/materializeLSPPluginManifest.ts +60 -0
- package/src/launcher/internal/ttscserver/needsStdio.ts +32 -0
- package/src/launcher/internal/ttscserver/runTtscserver.ts +592 -0
- package/src/launcher/internal/watch/CompilerDirectoryWatchEventPlan.ts +31 -0
- package/src/launcher/internal/watch/DirectoryWatcher.ts +45 -0
- package/src/launcher/internal/watch/FseventsStreams.ts +303 -0
- package/src/launcher/internal/watch/ProjectInputWatchRules.ts +179 -0
- package/src/launcher/internal/watch/WatchInputChange.ts +31 -0
- package/src/launcher/internal/watch/WatchPaths.ts +156 -0
- package/src/launcher/internal/{watchTopology.ts → watch/WatchTopology.ts} +867 -962
- package/src/launcher/internal/watch/literalGlobRoot.ts +40 -0
- package/src/launcher/internal/watch/planCompilerDirectoryWatchEvent.ts +83 -0
- package/src/launcher/internal/watch/projectInputActiveWatchDirectories.ts +47 -0
- package/src/launcher/internal/watch/projectInputAvailableWatchDirectory.ts +56 -0
- package/src/launcher/internal/watch/projectInputEventShouldNotify.ts +23 -0
- package/src/launcher/internal/watch/projectInputMembershipInvalidatesProgram.ts +63 -0
- package/src/launcher/internal/watch/projectInputReloadEventShouldNotify.ts +127 -0
- package/src/launcher/internal/watch/projectInputReplacementStrandsWatchers.ts +57 -0
- package/src/launcher/internal/watch/projectInputTopologyMayAffect.ts +73 -0
- package/src/launcher/internal/watch/projectInputWatchDirectories.ts +33 -0
- package/src/launcher/internal/watch/reloadInputsForFailedTopologyRefresh.ts +49 -0
- package/src/launcher/internal/watch/syncWatchers.ts +64 -0
- package/src/launcher/internal/watch/watchDirectory.ts +53 -0
- package/src/launcher/internal/watch/watchDirectoryThroughFsWatch.ts +47 -0
- package/src/launcher/ttscserver.ts +1 -1
- package/src/launcher/ttsx.ts +2 -3
- package/src/plugin/CapabilityPluginResolver.ts +549 -0
- package/src/plugin/ITtscCapabilityPlugin.ts +93 -0
- package/src/plugin/internal/CapabilityPluginResult.ts +99 -0
- package/src/plugin/internal/CapabilityResolutionFormat.ts +248 -0
- package/src/plugin/internal/ITtscCapabilityPluginSource.ts +37 -0
- package/src/plugin/internal/ITtscCapabilityResolutionEntry.ts +57 -0
- package/src/plugin/internal/ITtscCapabilityResolutionPlugin.ts +22 -0
- package/src/plugin/internal/capabilityPluginWorker.ts +216 -0
- package/src/plugin/internal/decodeCapabilityCommandReply.ts +27 -0
- package/src/plugin/internal/load/COMMONJS_PLUGIN_DESCRIPTOR_SHIM_SOURCE.ts +182 -0
- package/src/plugin/internal/load/PLUGIN_DESCRIPTOR_SHIM_SOURCE.ts +59 -0
- package/src/plugin/internal/load/PluginDescriptorAdmission.ts +75 -0
- package/src/plugin/internal/load/PluginDescriptorEvaluationCache.ts +432 -0
- package/src/plugin/internal/load/PluginPackageResolution.ts +711 -0
- package/src/plugin/internal/load/ProjectPluginEntries.ts +232 -0
- package/src/plugin/internal/load/RESOLUTION_INPUT_RECORDER_PATH.ts +34 -0
- package/src/plugin/internal/load/collectProjectHostInputs.ts +88 -0
- package/src/plugin/internal/load/composePluginSources.ts +121 -0
- package/src/plugin/internal/load/declaresHostInputReads.ts +52 -0
- package/src/plugin/internal/load/hasProjectPluginEntries.ts +33 -0
- package/src/plugin/internal/load/hashHostInputPaths.ts +44 -0
- package/src/plugin/internal/load/isRelativePluginSpecifier.ts +31 -0
- package/src/plugin/internal/load/loadProjectPlugins.ts +2334 -0
- package/src/plugin/internal/load/moduleResolutionBaseSelects.ts +59 -0
- package/src/plugin/internal/load/observeImportSearchRoots.ts +42 -0
- package/src/plugin/internal/load/pluginLabel.ts +28 -0
- package/src/plugin/internal/load/realpathHostInput.ts +22 -0
- package/src/plugin/internal/load/realpathHostInputPaths.ts +27 -0
- package/src/plugin/internal/load/rejectJsTransformFunctions.ts +23 -0
- package/src/plugin/internal/load/requirePluginSource.ts +34 -0
- package/src/plugin/internal/load/resolveNativeSource.ts +42 -0
- package/src/plugin/internal/load/validatePluginContributors.ts +102 -0
- package/src/plugin/internal/load/validatePluginSource.ts +19 -0
- package/src/plugin/internal/load/visitImportMappedCandidates.ts +63 -0
- package/src/plugin/internal/pluginDescriptorFailureReason.ts +35 -0
- package/src/plugin/internal/pluginDescriptorProcessFailure.ts +48 -0
- package/src/plugin/internal/readCapabilityResolution.ts +193 -0
- package/src/plugin/internal/receiveCapabilityFailure.ts +27 -0
- package/src/plugin/internal/source/CachePrunePolicy.ts +47 -0
- package/src/plugin/internal/source/GoBuildCacheCoordination.ts +588 -0
- package/src/plugin/internal/source/GoEnvironmentReading.ts +109 -0
- package/src/plugin/internal/source/GoSourceInputs.ts +182 -0
- package/src/plugin/internal/source/GoToolResolution.ts +312 -0
- package/src/plugin/internal/source/IGoBuildCachePruneOptions.ts +34 -0
- package/src/plugin/internal/source/IPluginCachePruneOptions.ts +38 -0
- package/src/plugin/internal/source/IPluginModuleReplaceDirectory.ts +30 -0
- package/src/plugin/internal/source/ITtscBuildContributor.ts +19 -0
- package/src/plugin/internal/source/ITtscSourceBuildCachePaths.ts +28 -0
- package/src/plugin/internal/source/NativeSourcePackages.ts +428 -0
- package/src/plugin/internal/source/PluginBinaryUse.ts +159 -0
- package/src/plugin/internal/source/PluginBinaryWaitResult.ts +34 -0
- package/src/plugin/internal/source/PluginBuildEnvironmentReadings.ts +273 -0
- package/src/plugin/internal/source/PluginBuildEnvironmentWitness.ts +243 -0
- package/src/plugin/internal/source/PluginBuildLockFence.ts +26 -0
- package/src/plugin/internal/source/PluginBuildLockLease.ts +31 -0
- package/src/plugin/internal/source/PluginBuildLockObservation.ts +48 -0
- package/src/plugin/internal/source/PluginBuildLockOwner.ts +225 -0
- package/src/plugin/internal/source/PluginBuildLockProtocol.ts +342 -0
- package/src/plugin/internal/source/SourceBuildCacheLayout.ts +303 -0
- package/src/plugin/internal/source/SourceBuildFilesystemOperations.ts +32 -0
- package/src/plugin/internal/source/SourcePluginAdmission.ts +127 -0
- package/src/plugin/internal/source/SourcePluginWorkspace.ts +564 -0
- package/src/plugin/internal/source/acquirePluginBuildLock.ts +222 -0
- package/src/plugin/internal/source/autoQuoteGoModToken.ts +113 -0
- package/src/plugin/internal/source/buildSourcePlugin.ts +1225 -0
- package/src/plugin/internal/source/collectPluginSourceDirectories.ts +70 -0
- package/src/plugin/internal/source/collectPluginSourceFiles.ts +90 -0
- package/src/plugin/internal/source/computeCacheKey.ts +208 -0
- package/src/plugin/internal/source/copiesPluginSourceEntry.ts +52 -0
- package/src/plugin/internal/source/createExternalSourceSnapshotLayout.ts +66 -0
- package/src/plugin/internal/source/ensureExecutableGoToolchain.ts +87 -0
- package/src/plugin/internal/source/formatDuration.ts +32 -0
- package/src/plugin/internal/source/formatGoWorkPath.ts +42 -0
- package/src/plugin/internal/source/hashPluginBuildEnvironment.ts +735 -0
- package/src/plugin/internal/source/inspectPluginBuildLock.ts +330 -0
- package/src/plugin/internal/source/isPathWithin.ts +24 -0
- package/src/plugin/internal/source/legacyGlobalCacheTargets.ts +71 -0
- package/src/plugin/internal/source/pluginBuildEnvironment.ts +59 -0
- package/src/plugin/internal/source/pluginBuildEnvironmentWorker.ts +30 -0
- package/src/plugin/internal/source/pluginBuildVersions.ts +75 -0
- package/src/plugin/internal/source/pluginModuleReplaceDirectories.ts +84 -0
- package/src/plugin/internal/source/pluginSourceCovers.ts +54 -0
- package/src/plugin/internal/source/pluginSourceDigest.ts +55 -0
- package/src/plugin/internal/source/pluginSourceFilesSignature.ts +54 -0
- package/src/plugin/internal/source/pluginSourceState.ts +69 -0
- package/src/plugin/internal/source/pluginSourceStateHolds.ts +45 -0
- package/src/plugin/internal/source/processPluginBuildEnvironment.ts +40 -0
- package/src/plugin/internal/source/pruneCacheFileRoot.ts +134 -0
- package/src/plugin/internal/source/pruneGoBuildCacheRoot.ts +228 -0
- package/src/plugin/internal/source/prunePluginCacheRoot.ts +507 -0
- package/src/plugin/internal/source/prunesPluginSourceDirectory.ts +25 -0
- package/src/plugin/internal/source/reclaimPluginBuildLock.ts +63 -0
- package/src/plugin/internal/source/recordCacheFileUse.ts +35 -0
- package/src/plugin/internal/source/releasePluginBuildLock.ts +125 -0
- package/src/plugin/internal/source/resolveCleanTargets.ts +84 -0
- package/src/plugin/internal/source/resolveGoCompiler.ts +92 -0
- package/src/plugin/internal/source/resolvePluginCacheRoot.ts +32 -0
- package/src/plugin/internal/source/resolvePluginGoModule.ts +69 -0
- package/src/plugin/internal/source/resolveSourceBuildCachePaths.ts +276 -0
- package/src/plugin/internal/source/selectPluginModuleReplaceDirectories.ts +80 -0
- package/src/plugin/internal/source/spawnGoTool.ts +204 -0
- package/src/plugin/internal/source/touchPluginCacheEntryInUse.ts +44 -0
- package/src/plugin/internal/source/waitForPluginBinary.ts +123 -0
- package/src/plugin/internal/source/windowsGoCommandArgs.ts +19 -0
- package/src/plugin/internal/source/withGoBuildCacheLease.ts +101 -0
- package/src/plugin/internal/writeCapabilityResolution.ts +266 -0
- package/src/plugin/resolveCapabilityPlugins.ts +242 -77
- package/src/register.ts +20 -7
- package/src/structures/ITtscCompilerContext.ts +29 -11
- package/src/structures/ITtscCompilerDiagnostic.ts +24 -7
- package/src/structures/ITtscCompilerResult.ts +75 -25
- package/src/structures/ITtscCompilerTransformation.ts +304 -64
- package/src/structures/ITtscPlugin.ts +24 -8
- package/src/structures/ITtscPluginCapabilities.ts +58 -5
- package/src/structures/ITtscPluginContributor.ts +19 -8
- package/src/structures/ITtscPluginFactoryContext.ts +12 -3
- package/src/structures/ITtscProjectPluginConfig.ts +35 -10
- package/src/structures/TtscPluginStage.ts +9 -0
- package/src/structures/internal/ITtscLoadedNativePlugin.ts +27 -5
- package/src/structures/internal/ITtscParsedProjectConfig.ts +37 -3
- package/src/structures/internal/ITtscProjectIdentity.ts +27 -6
- package/src/structures/internal/ITtscProjectInputSnapshot.ts +31 -8
- package/src/structures/internal/ITtscProjectLocatorOptions.ts +21 -4
- package/src/structures/internal/TtscBuildOptions.ts +38 -14
- package/src/structures/internal/TtscBuildResult.ts +74 -4
- package/src/structures/internal/TtscCommonOptions.ts +59 -14
- package/src/structures/internal/TtscSingleFileEmitOptions.ts +55 -5
- package/tools/gen_shims/main.go +124 -11
- package/tools/gen_shims/package_load_admission_rejects_incomplete_results_test.go +61 -0
- package/tools/gen_shims/private_field_support_preserves_upstream_layout_test.go +104 -0
- package/tools/shim_audit/enum_generation_preserves_existing_family_members_test.go +182 -0
- package/tools/shim_audit/enum_generation_refuses_removed_public_members_test.go +93 -0
- package/tools/shim_audit/main.go +166 -31
- package/tools/shim_audit/main_test.go +35 -0
- package/tools/shim_audit/producer_exemptions_require_rationale_test.go +5 -0
- package/tools/shim_audit/producer_surface_includes_exposed_methods_test.go +5 -0
- package/tools/shim_audit/producer_surface_rejects_unproducible_reference_test.go +5 -0
- package/tools/shim_audit/shim_dir_coverage_rejects_unregistered_shims_test.go +71 -0
- package/utility/command.go +48 -0
- package/utility/flags_gen.go +2 -2
- package/utility/host.go +282 -66
- package/utility/preamble_output.go +245 -0
- package/utility/preamble_output_test.go +90 -0
- package/utility/serve.go +61 -18
- package/cmd/ttscgraph/serve_graph_snapshot_version_matches_typescript_client_test.go +0 -32
- package/cmd/ttscgraph/serve_protocol_version_matches_the_typescript_client_test.go +0 -48
- package/cmd/ttscgraph/serve_session_retries_failed_dump_test.go +0 -103
- package/internal/graph/dump_schema_version_matches_the_typescript_client_test.go +0 -48
- package/internal/graph/edge_kinds_names_every_declared_kind_test.go +0 -49
- package/internal/graph/graph_kind_contracts_match_their_producers_test.go +0 -121
- package/internal/lspserver/lsp_launcher_reload_directory_fingerprint_parity_windows_test.go +0 -94
- package/internal/lspserver/lsp_project_diagnostics_resident_unsupported_falls_back_test.go +0 -123
- package/lib/compiler/internal/paths.d.ts +0 -27
- package/lib/compiler/internal/paths.js +0 -70
- package/lib/compiler/internal/paths.js.map +0 -1
- package/lib/compiler/internal/project/readConfigJson.d.ts +0 -30
- package/lib/compiler/internal/project/readConfigJson.js +0 -208
- package/lib/compiler/internal/project/readConfigJson.js.map +0 -1
- package/lib/compiler/internal/residentCheckProcess.d.ts +0 -44
- package/lib/compiler/internal/residentCheckProcess.js +0 -213
- package/lib/compiler/internal/residentCheckProcess.js.map +0 -1
- package/lib/compiler/internal/residentTransformProcess.d.ts +0 -65
- package/lib/compiler/internal/residentTransformProcess.js +0 -330
- package/lib/compiler/internal/residentTransformProcess.js.map +0 -1
- package/lib/compiler/internal/resolveEmittedJavaScript.d.ts +0 -25
- package/lib/compiler/internal/resolveEmittedJavaScript.js +0 -165
- package/lib/compiler/internal/resolveEmittedJavaScript.js.map +0 -1
- package/lib/compiler/internal/runBuild.d.ts +0 -152
- package/lib/compiler/internal/runBuild.js +0 -1694
- package/lib/compiler/internal/runBuild.js.map +0 -1
- package/lib/compiler/internal/sharedHostHelpers.d.ts +0 -79
- package/lib/compiler/internal/sharedHostHelpers.js +0 -134
- package/lib/compiler/internal/sharedHostHelpers.js.map +0 -1
- package/lib/flags/parser.d.ts +0 -97
- package/lib/flags/parser.js +0 -293
- package/lib/flags/parser.js.map +0 -1
- package/lib/flags/schema.d.ts +0 -191
- package/lib/flags/schema.js.map +0 -1
- package/lib/internal/windowsDirectoryCaseSensitivity.d.ts +0 -10
- package/lib/internal/windowsDirectoryCaseSensitivity.js +0 -34
- package/lib/internal/windowsDirectoryCaseSensitivity.js.map +0 -1
- package/lib/launcher/internal/commonJsExportMetadata.d.ts +0 -7
- package/lib/launcher/internal/commonJsExportMetadata.js.map +0 -1
- package/lib/launcher/internal/registerRuntimeHooks.js +0 -59
- package/lib/launcher/internal/registerRuntimeHooks.js.map +0 -1
- package/lib/launcher/internal/runTtscserver.d.ts +0 -35
- package/lib/launcher/internal/runTtscserver.js +0 -661
- package/lib/launcher/internal/runTtscserver.js.map +0 -1
- package/lib/launcher/internal/runtimeHooks.d.ts +0 -198
- package/lib/launcher/internal/runtimeHooks.js +0 -2579
- package/lib/launcher/internal/runtimeHooks.js.map +0 -1
- package/lib/launcher/internal/servedSourceMap.d.ts +0 -25
- package/lib/launcher/internal/servedSourceMap.js +0 -164
- package/lib/launcher/internal/servedSourceMap.js.map +0 -1
- package/lib/launcher/internal/singleFileOutput.d.ts +0 -16
- package/lib/launcher/internal/singleFileOutput.js +0 -103
- package/lib/launcher/internal/singleFileOutput.js.map +0 -1
- package/lib/launcher/internal/watchTopology.d.ts +0 -329
- package/lib/launcher/internal/watchTopology.js.map +0 -1
- package/lib/plugin/internal/buildSourcePlugin.d.ts +0 -298
- package/lib/plugin/internal/buildSourcePlugin.js +0 -3087
- package/lib/plugin/internal/buildSourcePlugin.js.map +0 -1
- package/lib/plugin/internal/capabilityResolutionCache.d.ts +0 -76
- package/lib/plugin/internal/capabilityResolutionCache.js +0 -224
- package/lib/plugin/internal/capabilityResolutionCache.js.map +0 -1
- package/lib/plugin/internal/descriptorProcessFailure.d.ts +0 -36
- package/lib/plugin/internal/descriptorProcessFailure.js +0 -62
- package/lib/plugin/internal/descriptorProcessFailure.js.map +0 -1
- package/lib/plugin/internal/loadProjectPlugins.d.ts +0 -75
- package/lib/plugin/internal/loadProjectPlugins.js +0 -2405
- package/lib/plugin/internal/loadProjectPlugins.js.map +0 -1
- package/src/compiler/internal/paths.ts +0 -68
- package/src/compiler/internal/project/readConfigJson.ts +0 -209
- package/src/compiler/internal/residentCheckProcess.ts +0 -259
- package/src/compiler/internal/residentTransformProcess.ts +0 -406
- package/src/compiler/internal/resolveEmittedJavaScript.ts +0 -197
- package/src/compiler/internal/runBuild.ts +0 -2345
- package/src/compiler/internal/sharedHostHelpers.ts +0 -154
- package/src/flags/parser.ts +0 -459
- package/src/internal/windowsDirectoryCaseSensitivity.ts +0 -33
- package/src/launcher/internal/registerRuntimeHooks.ts +0 -68
- package/src/launcher/internal/runTtscserver.ts +0 -842
- package/src/launcher/internal/runtimeHooks.ts +0 -3197
- package/src/launcher/internal/servedSourceMap.ts +0 -183
- package/src/launcher/internal/singleFileOutput.ts +0 -133
- package/src/plugin/internal/buildSourcePlugin.ts +0 -3993
- package/src/plugin/internal/capabilityResolutionCache.ts +0 -305
- package/src/plugin/internal/descriptorProcessFailure.ts +0 -69
- package/src/plugin/internal/loadProjectPlugins.ts +0 -3073
- package/tools/shim_audit/shim_dir_coverage_test.go +0 -25
- /package/lib/{launcher/internal/registerRuntimeHooks.d.ts → compiler/internal/transformProjectWorker.d.ts} +0 -0
|
@@ -0,0 +1,1287 @@
|
|
|
1
|
+
package main
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"bytes"
|
|
5
|
+
"encoding/json"
|
|
6
|
+
"fmt"
|
|
7
|
+
"github.com/samchon/ttsc/packages/ttsc/driver"
|
|
8
|
+
"io/fs"
|
|
9
|
+
"os"
|
|
10
|
+
"path/filepath"
|
|
11
|
+
"reflect"
|
|
12
|
+
"regexp"
|
|
13
|
+
"slices"
|
|
14
|
+
"strings"
|
|
15
|
+
"testing"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
// apiTransformGraph mirrors the graph section of the api-transform envelope.
|
|
19
|
+
//
|
|
20
|
+
// Private wire decoders retain native common grounds rather than unsupported
|
|
21
|
+
// exported-host Evidence annotations. These data carriers do not choose a
|
|
22
|
+
// processing algorithm, coordinate reusable work, own a lease lifecycle or
|
|
23
|
+
// access a native filesystem/process; their consumers own those decisions.
|
|
24
|
+
// Common: Principled implementation: Independently decodes adjacency lists, global-scope files and config ancestry under the literal edges/globals/configs wire names.
|
|
25
|
+
// Common: Clear and simple design: One map and two slices retain the three distinct graph relationships tested by literal membership assertions.
|
|
26
|
+
// Common: Prohibited implementation shortcuts: No adjacency or config expectation is generated here; the named observer compares actual decoded relationships with authored fixture relationships.
|
|
27
|
+
// Common: Meaningful documentation: Native prose names the graph fields and focused test ownership rather than asserting unobserved graph completeness.
|
|
28
|
+
type apiTransformGraph struct {
|
|
29
|
+
Edges map[string][]string `json:"edges"`
|
|
30
|
+
Globals []string `json:"globals"`
|
|
31
|
+
Configs []string `json:"configs"`
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// apiTransformResultWithGraph independently decodes the observed graph wire fields.
|
|
35
|
+
//
|
|
36
|
+
// Private wire decoders retain native common grounds rather than unsupported
|
|
37
|
+
// exported-host Evidence annotations. These data carriers do not choose a
|
|
38
|
+
// processing algorithm, coordinate reusable work, own a lease lifecycle or
|
|
39
|
+
// access a native filesystem/process; their consumers own those decisions.
|
|
40
|
+
// Common: Principled implementation: Independently decodes source text and a nullable graph pointer so absent/null graph fails before its original relationship assertions.
|
|
41
|
+
// Common: Clear and simple design: The graph pointer preserves the absent-section distinction while the text map retains its separate envelope field.
|
|
42
|
+
// Common: Prohibited implementation shortcuts: The decoder does not synthesize a missing graph, hide nil state or infer expected edges from actual output.
|
|
43
|
+
// Common: Meaningful documentation: Native prose explains nullable graph and focused envelope decoding; it does not claim observation of all response metadata.
|
|
44
|
+
type apiTransformResultWithGraph struct {
|
|
45
|
+
TypeScript map[string]string `json:"typescript"`
|
|
46
|
+
Graph *apiTransformGraph `json:"graph"`
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// TestCLICommandOperationFamilies verifies original command preparations and
|
|
50
|
+
// compiler result oracles with explicit immutable-fixture and Program ownership.
|
|
51
|
+
//
|
|
52
|
+
// The twenty-one command-operation identities remain named cases. Pure preparation
|
|
53
|
+
// observes original argv and selected defaults; separately named compiler
|
|
54
|
+
// operations load the declared config variant. Shared API response work uses
|
|
55
|
+
// one emit-capable Program while transform preparation still requires noEmit.
|
|
56
|
+
// No-output shared cases precede disk publication; each records its original
|
|
57
|
+
// absence oracle before cleanup restores the next case prerequisite.
|
|
58
|
+
//
|
|
59
|
+
// 1. Materialize nine unique projects and one shared source with five configs.
|
|
60
|
+
// 2. Observe original command/handler preparations and named result assertions.
|
|
61
|
+
// 3. Run project normalization once as an explicitly shared actual build, and
|
|
62
|
+
// borrow one actual API generation across memory emit and source response.
|
|
63
|
+
// 4. Publish the shared manifest last; close acquired Programs before cleanup.
|
|
64
|
+
//
|
|
65
|
+
// @evidence contracts/testing.md#behavioral-verification Original CLI status/stream, JSON source/output/graph, diagnostic and disk/manifest oracles remain named; original argv preparation and selected semantic config variants are separate observations.
|
|
66
|
+
// @evidence contracts/testing.md#independent-expectations Original literal argv, authored fixture bytes, JSON keys, source/export syntax, diagnostics and absence checks define expected behavior independently of actual output. Project aliases additionally assert literal normalized argv; API preparation asserts distinct ForceEmit versus ForceNoEmit policies.
|
|
67
|
+
// @evidence contracts/testing.md#distinguishing-cases All twenty-one old TestNames remain named cases, including alias/help/version variants, positive project publication, semantic/syntax/unused/declaration failures, implicit cwd and outside keys. Nested alias rootDir/source-path changes are explicit fixture deltas.
|
|
68
|
+
// @evidence contracts/testing.md#execution-ownership Actual private preparation is consumed by the real dispatcher; loaded response operations use real driver Programs with explicit owners. The family plans ten roots, fourteen selected config entries, twenty-seven fixture files and fifteen Program loads. Twenty-one named command-operation cases execute here; their returned statuses do not certify external OS exit transport or a child-process census. Nine case-owned TempDirs and one lazily acquired shared native workspace supply the ten roots. Counts are design expectations until actual validation, and the extended base config is an additional config file rather than a separately selected entry.
|
|
69
|
+
func TestCLICommandOperationFamilies(t *testing.T) {
|
|
70
|
+
t.Setenv(driver.LinkedPluginsEnv, "")
|
|
71
|
+
var sharedWorkspace, sharedRoot string
|
|
72
|
+
var sharedPrerequisiteErr error
|
|
73
|
+
sharedPrepared := false
|
|
74
|
+
// Only the six dependent cases request this fixture. Independent cases run
|
|
75
|
+
// first; a failed preparation is retained locally without aborting the family.
|
|
76
|
+
prepareShared := func() error {
|
|
77
|
+
if sharedPrepared {
|
|
78
|
+
return sharedPrerequisiteErr
|
|
79
|
+
}
|
|
80
|
+
sharedPrepared = true
|
|
81
|
+
owner, err := filepath.Abs(os.TempDir())
|
|
82
|
+
if err != nil {
|
|
83
|
+
sharedPrerequisiteErr = fmt.Errorf("shared temporary owner: %w", err)
|
|
84
|
+
return sharedPrerequisiteErr
|
|
85
|
+
}
|
|
86
|
+
sharedWorkspace, err = os.MkdirTemp(owner, "ttsc-cli-operation-families-")
|
|
87
|
+
if err != nil {
|
|
88
|
+
sharedPrerequisiteErr = fmt.Errorf("shared temporary workspace: %w", err)
|
|
89
|
+
return sharedPrerequisiteErr
|
|
90
|
+
}
|
|
91
|
+
// Register removal immediately, including partially copied/error fixtures.
|
|
92
|
+
// The aggregate owns this immutable path until all children and cwd/Program
|
|
93
|
+
// cleanups have completed; a failed guard retains it and fails the family.
|
|
94
|
+
workspace := sharedWorkspace
|
|
95
|
+
t.Cleanup(func() {
|
|
96
|
+
absolute, resolveErr := filepath.Abs(workspace)
|
|
97
|
+
relative, relativeErr := filepath.Rel(owner, absolute)
|
|
98
|
+
if resolveErr != nil || relativeErr != nil || filepath.IsAbs(relative) || relative == "." || relative == ".." || strings.HasPrefix(relative, ".."+string(filepath.Separator)) || !strings.HasPrefix(filepath.Base(absolute), "ttsc-cli-operation-families-") {
|
|
99
|
+
t.Errorf("shared workspace cleanup outside owner: %s", workspace)
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
if err := os.RemoveAll(absolute); err != nil {
|
|
103
|
+
t.Errorf("shared workspace cleanup: %v", err)
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
sharedRoot = filepath.Join(sharedWorkspace, "project")
|
|
107
|
+
sharedPrerequisiteErr = copyCLIFamilyFixture(filepath.Join("testdata", "cli_operation_families", "shared-value-one", "project"), sharedRoot)
|
|
108
|
+
if sharedPrerequisiteErr == nil {
|
|
109
|
+
if _, err := os.Stat(filepath.Join(sharedRoot, "bin", "index.js")); !os.IsNotExist(err) {
|
|
110
|
+
sharedPrerequisiteErr = fmt.Errorf("shared family requires initial output absence: %v", err)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return sharedPrerequisiteErr
|
|
114
|
+
}
|
|
115
|
+
t.Run("TestCLIAPICompileAndTransform", func(t *testing.T) {
|
|
116
|
+
root := t.TempDir()
|
|
117
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIAPICompileAndTransform"), root)
|
|
118
|
+
var owned *driver.Program
|
|
119
|
+
var initial []driver.Diagnostic
|
|
120
|
+
t.Cleanup(func() {
|
|
121
|
+
if owned != nil {
|
|
122
|
+
if err := owned.Close(); err != nil {
|
|
123
|
+
t.Errorf("API shared Program Close: %v", err)
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
invoke := func(t *testing.T, args ...string) (int, string, string) {
|
|
128
|
+
return captureCLIFamilyOperation(t, func() int {
|
|
129
|
+
kind, values, status := prepareCommandInvocation(args)
|
|
130
|
+
if status != 0 {
|
|
131
|
+
return status
|
|
132
|
+
}
|
|
133
|
+
var request apiCommandRequest
|
|
134
|
+
if kind == commandAPICompile {
|
|
135
|
+
request, status = prepareAPICompileInvocation(values)
|
|
136
|
+
} else if kind == commandAPITransform {
|
|
137
|
+
request, status = prepareAPITransformInvocation(values)
|
|
138
|
+
} else {
|
|
139
|
+
t.Fatalf("unexpected API dispatch kind: %v", kind)
|
|
140
|
+
}
|
|
141
|
+
if status != 0 {
|
|
142
|
+
return status
|
|
143
|
+
}
|
|
144
|
+
if request.cwd != root || request.tsconfigPath != "tsconfig.json" {
|
|
145
|
+
t.Fatalf("API preparation cwd/config: %#v", request)
|
|
146
|
+
}
|
|
147
|
+
if kind == commandAPICompile {
|
|
148
|
+
if !request.options.ForceEmit || request.options.ForceNoEmit {
|
|
149
|
+
t.Fatal("compile preparation must force emit only")
|
|
150
|
+
}
|
|
151
|
+
var err error
|
|
152
|
+
owned, initial, err = driver.LoadProgram(request.cwd, request.tsconfigPath, request.options)
|
|
153
|
+
if err != nil {
|
|
154
|
+
t.Fatalf("API shared producer failed: %v", err)
|
|
155
|
+
}
|
|
156
|
+
return writeCompiledProgramResponse(owned, initial, request.cwd)
|
|
157
|
+
}
|
|
158
|
+
if !request.options.ForceNoEmit || request.options.ForceEmit {
|
|
159
|
+
t.Fatal("transform preparation must force noEmit only")
|
|
160
|
+
}
|
|
161
|
+
if owned == nil {
|
|
162
|
+
t.Fatal("source response requires actual compile-owned Program")
|
|
163
|
+
}
|
|
164
|
+
// Actual noEmit loader mechanism is separately owned by
|
|
165
|
+
// TestDriverLoadProgramForceNoEmitSuppressesRawEmit. This response
|
|
166
|
+
// borrows the emit-capable generation without changing its options.
|
|
167
|
+
return writeTransformedProgramResponse(owned, initial, request.cwd)
|
|
168
|
+
})
|
|
169
|
+
}
|
|
170
|
+
observeTestCLIAPICompileAndTransform(t, root, invoke)
|
|
171
|
+
})
|
|
172
|
+
t.Run("TestAPITransformEnvelopeCarriesReferenceGraph", func(t *testing.T) {
|
|
173
|
+
root := t.TempDir()
|
|
174
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestAPITransformEnvelopeCarriesReferenceGraph"), root)
|
|
175
|
+
observeTestAPITransformEnvelopeCarriesReferenceGraph(t, root, runCLIContractCommand)
|
|
176
|
+
})
|
|
177
|
+
t.Run("TestCLIAPITransformUsesCurrentDirectory", func(t *testing.T) {
|
|
178
|
+
root := t.TempDir()
|
|
179
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIAPITransformUsesCurrentDirectory"), root)
|
|
180
|
+
observeTestCLIAPITransformUsesCurrentDirectory(t, root, runCLIContractCommand)
|
|
181
|
+
})
|
|
182
|
+
t.Run("TestCLICommandHelpAliases", func(t *testing.T) {
|
|
183
|
+
root := ""
|
|
184
|
+
observeTestCLICommandHelpAliases(t, root, runCLIContractCommand)
|
|
185
|
+
})
|
|
186
|
+
t.Run("TestCLICommandRejectsConflictingEmitFlags", func(t *testing.T) {
|
|
187
|
+
root := ""
|
|
188
|
+
observeTestCLICommandRejectsConflictingEmitFlags(t, root, runCLIContractCommand)
|
|
189
|
+
})
|
|
190
|
+
t.Run("TestCLICommandRejectsMissingProjectArgument", func(t *testing.T) {
|
|
191
|
+
root := ""
|
|
192
|
+
observeTestCLICommandRejectsMissingProjectArgument(t, root, runCLIContractCommand)
|
|
193
|
+
})
|
|
194
|
+
t.Run("TestCLICommandRejectsUnknown", func(t *testing.T) {
|
|
195
|
+
root := ""
|
|
196
|
+
observeTestCLICommandRejectsUnknown(t, root, runCLIContractCommand)
|
|
197
|
+
})
|
|
198
|
+
t.Run("TestCLICommandVersionAliases", func(t *testing.T) {
|
|
199
|
+
root := ""
|
|
200
|
+
observeTestCLICommandVersionAliases(t, root, runCLIContractCommand)
|
|
201
|
+
})
|
|
202
|
+
t.Run("TestCLIProjectBuildAllowsUnusedTypeParametersOnOverloadSignatures", func(t *testing.T) {
|
|
203
|
+
root := t.TempDir()
|
|
204
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIProjectBuildAllowsUnusedTypeParametersOnOverloadSignatures"), root)
|
|
205
|
+
observeTestCLIProjectBuildAllowsUnusedTypeParametersOnOverloadSignatures(t, root, runCLIContractCommand)
|
|
206
|
+
})
|
|
207
|
+
t.Run("TestCLIProjectBuildBlocksSemanticDiagnostics", func(t *testing.T) {
|
|
208
|
+
root := t.TempDir()
|
|
209
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIProjectBuildBlocksSemanticDiagnostics"), root)
|
|
210
|
+
observeTestCLIProjectBuildBlocksSemanticDiagnostics(t, root, runCLIContractCommand)
|
|
211
|
+
})
|
|
212
|
+
t.Run("TestCLIProjectBuildBlocksSyntacticDiagnostics", func(t *testing.T) {
|
|
213
|
+
root := t.TempDir()
|
|
214
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIProjectBuildBlocksSyntacticDiagnostics"), root)
|
|
215
|
+
observeTestCLIProjectBuildBlocksSyntacticDiagnostics(t, root, runCLIContractCommand)
|
|
216
|
+
})
|
|
217
|
+
t.Run("TestCLIProjectBuildBlocksUnusedParameters", func(t *testing.T) {
|
|
218
|
+
root := t.TempDir()
|
|
219
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIProjectBuildBlocksUnusedParameters"), root)
|
|
220
|
+
observeTestCLIProjectBuildBlocksUnusedParameters(t, root, runCLIContractCommand)
|
|
221
|
+
})
|
|
222
|
+
t.Run("TestCLIProjectBuildEmitErrorRejectsManifest", func(t *testing.T) {
|
|
223
|
+
root := t.TempDir()
|
|
224
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIProjectBuildEmitErrorRejectsManifest"), root)
|
|
225
|
+
observeTestCLIProjectBuildEmitErrorRejectsManifest(t, root, runCLIContractCommand)
|
|
226
|
+
})
|
|
227
|
+
t.Run("TestCLIReportsDiagnosticsWithoutEmit", func(t *testing.T) {
|
|
228
|
+
root := t.TempDir()
|
|
229
|
+
materializeCLIFamily(t, filepath.Join("testdata", "cli_operation_families", "TestCLIReportsDiagnosticsWithoutEmit"), root)
|
|
230
|
+
observeTestCLIReportsDiagnosticsWithoutEmit(t, root, runCLIContractCommand)
|
|
231
|
+
})
|
|
232
|
+
t.Run("TestCLIRunUnknownCommandExits2", func(t *testing.T) {
|
|
233
|
+
root := ""
|
|
234
|
+
observeTestCLIRunUnknownCommandExits2(t, root, runCLIContractCommand)
|
|
235
|
+
})
|
|
236
|
+
t.Run("TestCLIAPICompilePreservesOutsideOutputKey", func(t *testing.T) {
|
|
237
|
+
if err := prepareShared(); err != nil {
|
|
238
|
+
t.Fatalf("shared authored fixture prerequisite: %v", err)
|
|
239
|
+
}
|
|
240
|
+
root := sharedRoot
|
|
241
|
+
t.Cleanup(func() { cleanCLIFamilyOutputs(t, sharedWorkspace, root) })
|
|
242
|
+
invoke := func(t *testing.T, args ...string) (int, string, string) {
|
|
243
|
+
return captureCLIFamilyOperation(t, func() int {
|
|
244
|
+
kind, values, status := prepareCommandInvocation(args)
|
|
245
|
+
if status != 0 {
|
|
246
|
+
return status
|
|
247
|
+
}
|
|
248
|
+
if kind != commandAPICompile {
|
|
249
|
+
t.Fatalf("unexpected original dispatch: %v", kind)
|
|
250
|
+
}
|
|
251
|
+
request, status := prepareAPICompileInvocation(values)
|
|
252
|
+
if status != 0 {
|
|
253
|
+
return status
|
|
254
|
+
}
|
|
255
|
+
if request.cwd != root || request.tsconfigPath != "tsconfig.json" || !request.options.ForceEmit || request.options.ForceNoEmit {
|
|
256
|
+
t.Fatalf("outside compile preparation: %#v", request)
|
|
257
|
+
}
|
|
258
|
+
// The original default-config argv is observed above. This separate
|
|
259
|
+
// actual semantic operation selects the declared immutable variant.
|
|
260
|
+
prog, diags, err := driver.LoadProgram(root, "outside.json", request.options)
|
|
261
|
+
if err != nil {
|
|
262
|
+
t.Fatalf("outside Program load: %v", err)
|
|
263
|
+
}
|
|
264
|
+
if prog != nil {
|
|
265
|
+
defer prog.Close()
|
|
266
|
+
}
|
|
267
|
+
return writeCompiledProgramResponse(prog, diags, root)
|
|
268
|
+
})
|
|
269
|
+
}
|
|
270
|
+
observeTestCLIAPICompilePreservesOutsideOutputKey(t, root, invoke)
|
|
271
|
+
})
|
|
272
|
+
t.Run("TestCLICommandAcceptsFlagShapedBuildAlias", func(t *testing.T) {
|
|
273
|
+
if err := prepareShared(); err != nil {
|
|
274
|
+
t.Fatalf("shared authored fixture prerequisite: %v", err)
|
|
275
|
+
}
|
|
276
|
+
root := sharedRoot
|
|
277
|
+
t.Cleanup(func() { cleanCLIFamilyOutputs(t, sharedWorkspace, root) })
|
|
278
|
+
invoke := func(t *testing.T, args ...string) (int, string, string) {
|
|
279
|
+
return captureCLIFamilyOperation(t, func() int {
|
|
280
|
+
kind, values, status := prepareCommandInvocation(args)
|
|
281
|
+
if status != 0 {
|
|
282
|
+
return status
|
|
283
|
+
}
|
|
284
|
+
if kind != commandBuild {
|
|
285
|
+
t.Fatalf("unexpected original dispatch: %v", kind)
|
|
286
|
+
}
|
|
287
|
+
request, status := prepareBuildInvocation(values)
|
|
288
|
+
if status != 0 {
|
|
289
|
+
return status
|
|
290
|
+
}
|
|
291
|
+
if request.cwd != root || request.tsconfigPath != "tsconfig.json" || request.options.ForceNoEmit != true || request.options.ForceEmit != false {
|
|
292
|
+
t.Fatalf("original build preparation: %#v", request)
|
|
293
|
+
}
|
|
294
|
+
request.tsconfigPath = "flag-shaped.json" // explicit semantic variant, not the original argv-selected name
|
|
295
|
+
prog, diags, err := driver.LoadProgram(request.cwd, request.tsconfigPath, request.options)
|
|
296
|
+
if err != nil {
|
|
297
|
+
t.Fatalf("variant Program load: %v", err)
|
|
298
|
+
}
|
|
299
|
+
if prog != nil {
|
|
300
|
+
defer prog.Close()
|
|
301
|
+
}
|
|
302
|
+
return writeBuildProgramResponse(prog, diags, request)
|
|
303
|
+
})
|
|
304
|
+
}
|
|
305
|
+
observeTestCLICommandAcceptsFlagShapedBuildAlias(t, root, invoke)
|
|
306
|
+
})
|
|
307
|
+
// TestCLICommandAcceptsProjectFlagAliases verifies literal alias normalization
|
|
308
|
+
// and one explicitly shared noEmit build of the normalized project arguments.
|
|
309
|
+
//
|
|
310
|
+
// Both aliases independently reach real preparation with the same literal
|
|
311
|
+
// normalized argv. The compiler operation runs once under its own named child;
|
|
312
|
+
// its result is not replayed as two alias invocations. The nested config's
|
|
313
|
+
// explicit parent rootDir contains the genuinely shared source file.
|
|
314
|
+
//
|
|
315
|
+
// 1. Prepare -p and --project separately and compare the exact normalized argv.
|
|
316
|
+
// 2. Execute the normalized build once with the actual selected config.
|
|
317
|
+
// 3. Require successful status and absence of bin/index.js.
|
|
318
|
+
//
|
|
319
|
+
// Testing behavioral-verification: Real preparation selects build and its literal normalized args; a separately named actual build succeeds without disk JavaScript.
|
|
320
|
+
// Testing independent-expectations: Authored -p/--project operands and --tsconfig=<config>, --noEmit literals define expected normalization independently; native Stat defines the output absence oracle.
|
|
321
|
+
// Testing distinguishing-cases: Both aliases retain named preparation failures while one shared_normalized_build child owns compiler status and disk assertions.
|
|
322
|
+
// Testing execution-ownership: Local shared preparation owns fixture bytes; two pure production preparations acquire no Program, and runBuild owns one actual Program and Close lifecycle.
|
|
323
|
+
t.Run("TestCLICommandAcceptsProjectFlagAliases", func(t *testing.T) {
|
|
324
|
+
if err := prepareShared(); err != nil {
|
|
325
|
+
t.Fatalf("shared authored fixture prerequisite: %v", err)
|
|
326
|
+
}
|
|
327
|
+
root := sharedRoot
|
|
328
|
+
t.Cleanup(func() { cleanCLIFamilyOutputs(t, sharedWorkspace, root) })
|
|
329
|
+
config := filepath.Join(root, "nested", "tsconfig.app.json")
|
|
330
|
+
expected := []string{"--tsconfig=" + config, "--noEmit"}
|
|
331
|
+
for _, flag := range []string{"-p", "--project"} {
|
|
332
|
+
t.Run(flag, func(t *testing.T) {
|
|
333
|
+
code, out, errOut := captureCLIFamilyOperation(t, func() int {
|
|
334
|
+
kind, values, status := prepareCommandInvocation([]string{flag, config, "--noEmit"})
|
|
335
|
+
if kind != commandBuild || !reflect.DeepEqual(values, expected) {
|
|
336
|
+
t.Fatalf("%s normalization: kind=%v args=%#v", flag, kind, values)
|
|
337
|
+
}
|
|
338
|
+
return status
|
|
339
|
+
})
|
|
340
|
+
if code != 0 {
|
|
341
|
+
t.Fatalf("%s alias preparation failed: code=%d stdout=%q stderr=%q", flag, code, out, errOut)
|
|
342
|
+
}
|
|
343
|
+
})
|
|
344
|
+
}
|
|
345
|
+
t.Run("shared_normalized_build", func(t *testing.T) {
|
|
346
|
+
code, out, errOut := captureCLIFamilyOperation(t, func() int { return runBuild(expected) })
|
|
347
|
+
if code != 0 {
|
|
348
|
+
t.Fatalf("%s alias failed: code=%d stdout=%q stderr=%q", "shared normalized -p/--project", code, out, errOut)
|
|
349
|
+
}
|
|
350
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); !os.IsNotExist(err) {
|
|
351
|
+
t.Fatalf("%s alias should not emit JavaScript: %v", "shared normalized -p/--project", err)
|
|
352
|
+
}
|
|
353
|
+
})
|
|
354
|
+
})
|
|
355
|
+
t.Run("TestCLICommandCheckAliasSuppressesEmit", func(t *testing.T) {
|
|
356
|
+
if err := prepareShared(); err != nil {
|
|
357
|
+
t.Fatalf("shared authored fixture prerequisite: %v", err)
|
|
358
|
+
}
|
|
359
|
+
root := sharedRoot
|
|
360
|
+
t.Cleanup(func() { cleanCLIFamilyOutputs(t, sharedWorkspace, root) })
|
|
361
|
+
invoke := func(t *testing.T, args ...string) (int, string, string) {
|
|
362
|
+
return captureCLIFamilyOperation(t, func() int {
|
|
363
|
+
kind, values, status := prepareCommandInvocation(args)
|
|
364
|
+
if status != 0 {
|
|
365
|
+
return status
|
|
366
|
+
}
|
|
367
|
+
if kind != commandBuild {
|
|
368
|
+
t.Fatalf("unexpected original dispatch: %v", kind)
|
|
369
|
+
}
|
|
370
|
+
request, status := prepareBuildInvocation(values)
|
|
371
|
+
if status != 0 {
|
|
372
|
+
return status
|
|
373
|
+
}
|
|
374
|
+
if request.cwd != root || request.tsconfigPath != "tsconfig.json" || request.options.ForceNoEmit != true || request.options.ForceEmit != false {
|
|
375
|
+
t.Fatalf("original build preparation: %#v", request)
|
|
376
|
+
}
|
|
377
|
+
request.tsconfigPath = "emit.json" // explicit semantic variant, not the original argv-selected name
|
|
378
|
+
prog, diags, err := driver.LoadProgram(request.cwd, request.tsconfigPath, request.options)
|
|
379
|
+
if err != nil {
|
|
380
|
+
t.Fatalf("variant Program load: %v", err)
|
|
381
|
+
}
|
|
382
|
+
if prog != nil {
|
|
383
|
+
defer prog.Close()
|
|
384
|
+
}
|
|
385
|
+
return writeBuildProgramResponse(prog, diags, request)
|
|
386
|
+
})
|
|
387
|
+
}
|
|
388
|
+
observeTestCLICommandCheckAliasSuppressesEmit(t, root, invoke)
|
|
389
|
+
})
|
|
390
|
+
t.Run("TestCLICommandRunsProjectFromCurrentDirectory", func(t *testing.T) {
|
|
391
|
+
if err := prepareShared(); err != nil {
|
|
392
|
+
t.Fatalf("shared authored fixture prerequisite: %v", err)
|
|
393
|
+
}
|
|
394
|
+
root := sharedRoot
|
|
395
|
+
t.Cleanup(func() { cleanCLIFamilyOutputs(t, sharedWorkspace, root) })
|
|
396
|
+
invoke := func(t *testing.T, args ...string) (int, string, string) {
|
|
397
|
+
return captureCLIFamilyOperation(t, func() int {
|
|
398
|
+
kind, values, status := prepareCommandInvocation(args)
|
|
399
|
+
if status != 0 {
|
|
400
|
+
return status
|
|
401
|
+
}
|
|
402
|
+
if kind != commandBuild {
|
|
403
|
+
t.Fatalf("unexpected original dispatch: %v", kind)
|
|
404
|
+
}
|
|
405
|
+
request, status := prepareBuildInvocation(values)
|
|
406
|
+
if status != 0 {
|
|
407
|
+
return status
|
|
408
|
+
}
|
|
409
|
+
if request.cwd != root || request.tsconfigPath != "tsconfig.json" || request.options.ForceNoEmit != false || request.options.ForceEmit != false {
|
|
410
|
+
t.Fatalf("original build preparation: %#v", request)
|
|
411
|
+
}
|
|
412
|
+
request.tsconfigPath = "tsconfig.json" // explicit semantic variant, not the original argv-selected name
|
|
413
|
+
prog, diags, err := driver.LoadProgram(request.cwd, request.tsconfigPath, request.options)
|
|
414
|
+
if err != nil {
|
|
415
|
+
t.Fatalf("variant Program load: %v", err)
|
|
416
|
+
}
|
|
417
|
+
if prog != nil {
|
|
418
|
+
defer prog.Close()
|
|
419
|
+
}
|
|
420
|
+
return writeBuildProgramResponse(prog, diags, request)
|
|
421
|
+
})
|
|
422
|
+
}
|
|
423
|
+
observeTestCLICommandRunsProjectFromCurrentDirectory(t, root, invoke)
|
|
424
|
+
})
|
|
425
|
+
t.Run("TestCLIProjectBuildEmitsManifest", func(t *testing.T) {
|
|
426
|
+
if err := prepareShared(); err != nil {
|
|
427
|
+
t.Fatalf("shared authored fixture prerequisite: %v", err)
|
|
428
|
+
}
|
|
429
|
+
root := sharedRoot
|
|
430
|
+
t.Cleanup(func() { cleanCLIFamilyOutputs(t, sharedWorkspace, root) })
|
|
431
|
+
invoke := func(t *testing.T, args ...string) (int, string, string) {
|
|
432
|
+
return captureCLIFamilyOperation(t, func() int {
|
|
433
|
+
kind, values, status := prepareCommandInvocation(args)
|
|
434
|
+
if status != 0 {
|
|
435
|
+
return status
|
|
436
|
+
}
|
|
437
|
+
if kind != commandBuild {
|
|
438
|
+
t.Fatalf("unexpected original dispatch: %v", kind)
|
|
439
|
+
}
|
|
440
|
+
request, status := prepareBuildInvocation(values)
|
|
441
|
+
if status != 0 {
|
|
442
|
+
return status
|
|
443
|
+
}
|
|
444
|
+
if request.cwd != root || request.tsconfigPath != "tsconfig.json" || request.options.ForceNoEmit != false || request.options.ForceEmit != true {
|
|
445
|
+
t.Fatalf("original build preparation: %#v", request)
|
|
446
|
+
}
|
|
447
|
+
request.tsconfigPath = "emit.json" // explicit semantic variant, not the original argv-selected name
|
|
448
|
+
prog, diags, err := driver.LoadProgram(request.cwd, request.tsconfigPath, request.options)
|
|
449
|
+
if err != nil {
|
|
450
|
+
t.Fatalf("variant Program load: %v", err)
|
|
451
|
+
}
|
|
452
|
+
if prog != nil {
|
|
453
|
+
defer prog.Close()
|
|
454
|
+
}
|
|
455
|
+
return writeBuildProgramResponse(prog, diags, request)
|
|
456
|
+
})
|
|
457
|
+
}
|
|
458
|
+
observeTestCLIProjectBuildEmitsManifest(t, root, invoke)
|
|
459
|
+
})
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// captureCLIFamilyOperation owns full native stream bytes around one real
|
|
463
|
+
// supplied operation. The closure exposes its actual producer/borrower call.
|
|
464
|
+
//
|
|
465
|
+
// Private Go helpers retain native review grounds rather than unsupported export-host annotations.
|
|
466
|
+
// Common: Principled implementation: The real supplied synchronous closure supplies its actual status while full stdout/stderr buffers capture bytes and defer restores both streams plus real os.Getwd.
|
|
467
|
+
// Common: Clear and simple design: One closure owns stream capture; producer/load/borrow calls stay visible in the caller.
|
|
468
|
+
// Common: Prohibited implementation shortcuts: No subprocess is called a unit, expected response fabricated, failure skipped or previous compiler result replayed.
|
|
469
|
+
// Common: Meaningful documentation: Native prose names actual operation, owner and limits; the caller declares fixture/config and producer observations.
|
|
470
|
+
// Portability: OS-neutral implementation: Native Go path/writer/testing APIs preserve platform semantics without shell, symlink fixtures or forced separators.
|
|
471
|
+
// Performance: Efficient algorithms: Work is proportional to captured stream bytes; no independent byte cap or command timeout exists.
|
|
472
|
+
// Performance: Reuse equivalent work: No response or compiler status is cached; each closure executes once.
|
|
473
|
+
// Performance: Bound retention and release resources: The previous package seams are restored by defer even on panic or Goexit; returned strings own bytes until their named observer finishes.
|
|
474
|
+
func captureCLIFamilyOperation(t *testing.T, operation func() int) (int, string, string) {
|
|
475
|
+
t.Helper()
|
|
476
|
+
previousOut, previousErr, previousGetwd := stdout, stderr, getwd
|
|
477
|
+
var out, errOut bytes.Buffer
|
|
478
|
+
stdout, stderr, getwd = &out, &errOut, os.Getwd
|
|
479
|
+
defer func() { stdout, stderr, getwd = previousOut, previousErr, previousGetwd }()
|
|
480
|
+
code := operation()
|
|
481
|
+
return code, out.String(), errOut.String()
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// invokeInCurrentDirectory preserves omitted cwd by changing the actual native
|
|
485
|
+
// directory with test-owned restoration; it does not replace getwd's result.
|
|
486
|
+
//
|
|
487
|
+
// Private Go helpers retain native review grounds rather than unsupported export-host annotations.
|
|
488
|
+
// Common: Principled implementation: testing.T.Chdir changes the actual native process directory before omitted cwd reaches real os.Getwd.
|
|
489
|
+
// Common: Clear and simple design: One actual directory change precedes the explicitly supplied closure.
|
|
490
|
+
// Common: Prohibited implementation shortcuts: No subprocess is called a unit, expected response fabricated, failure skipped or previous compiler result replayed.
|
|
491
|
+
// Common: Meaningful documentation: Native prose names actual operation, owner and limits; the caller declares fixture/config and producer observations.
|
|
492
|
+
// Portability: OS-neutral implementation: Native Go path/writer/testing APIs preserve platform semantics without shell, symlink fixtures or forced separators.
|
|
493
|
+
// Performance: Efficient algorithms: One native cwd change introduces no recursive input processing.
|
|
494
|
+
// Performance: Reuse equivalent work: The helper does not replay a cwd resolver or prior result.
|
|
495
|
+
// Performance: Bound retention and release resources: Subtest cleanup restores cwd before aggregate-owned fixture removal; no parallel test or ancestor is permitted.
|
|
496
|
+
func invokeInCurrentDirectory(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string), args ...string) (int, string, string) {
|
|
497
|
+
t.Helper()
|
|
498
|
+
t.Chdir(root)
|
|
499
|
+
return invoke(t, args...)
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
// materializeCLIFamily copies each authored static fixture once to its owning
|
|
503
|
+
// fresh root; configurations and source are read from maintained testdata.
|
|
504
|
+
//
|
|
505
|
+
// Private Go helpers retain native review grounds rather than unsupported export-host annotations.
|
|
506
|
+
// Common: Principled implementation: Actual static authored config/source bytes are copied once per immutable family; symlink fixtures are rejected.
|
|
507
|
+
// Common: Clear and simple design: WalkDir reads maintained fixture files and writes one declared fresh owner root.
|
|
508
|
+
// Common: Prohibited implementation shortcuts: No subprocess is called a unit, expected response fabricated, failure skipped or previous compiler result replayed.
|
|
509
|
+
// Common: Meaningful documentation: Native prose names actual operation, owner and limits; the caller declares fixture/config and producer observations.
|
|
510
|
+
// Portability: OS-neutral implementation: Native Go path/writer/testing APIs preserve platform semantics without shell, symlink fixtures or forced separators.
|
|
511
|
+
// Performance: Efficient algorithms: One traversal and one read/write per authored file scale with real fixture bytes.
|
|
512
|
+
// Performance: Reuse equivalent work: Unique roots use this child-local wrapper; the six shared cases call the error-return copy once through their declared local prerequisite owner.
|
|
513
|
+
// Performance: Bound retention and release resources: Each file byte slice is local to its synchronous visit; testing.TempDir owns removal after all child consumers and Program Close cleanup.
|
|
514
|
+
func materializeCLIFamily(t *testing.T, source, destination string) {
|
|
515
|
+
t.Helper()
|
|
516
|
+
if err := copyCLIFamilyFixture(source, destination); err != nil {
|
|
517
|
+
t.Fatalf("materialize CLI family: %v", err)
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// copyCLIFamilyFixture copies authored bytes while returning prerequisite errors.
|
|
522
|
+
//
|
|
523
|
+
// The caller owns a fresh destination and its cleanup. Returning the first real
|
|
524
|
+
// traversal/read/write error lets shared dependents report that failure without
|
|
525
|
+
// terminating unrelated named cases; it does not cache a compiler result.
|
|
526
|
+
// Common: Principled implementation: The original WalkDir/Rel/MkdirAll/read/write sequence copies maintained bytes and rejects symlink fixture entries.
|
|
527
|
+
// Common: Clear and simple design: One synchronous traversal returns its error to the actual resource owner, which chooses child-local Fatal or shared error propagation.
|
|
528
|
+
// Common: Prohibited implementation shortcuts: No authored bytes, compiler status or response are synthesized; partial failure remains an error and cleanup belongs to the caller.
|
|
529
|
+
// Common: Meaningful documentation: Native prose distinguishes fixture preparation from actual command observations and describes the first-error boundary.
|
|
530
|
+
// Portability: OS-neutral implementation: Native filepath and filesystem APIs preserve platform path semantics without shell commands or symlink fixtures.
|
|
531
|
+
// Performance: Efficient algorithms: One traversal and one read/write per file scale with authored bytes; no additional independent size limit is imposed.
|
|
532
|
+
// Performance: Reuse equivalent work: Only the immutable shared fixture is copied once; independent roots copy their own fixtures and no Program result is replayed.
|
|
533
|
+
// Performance: Bound retention and release resources: File bytes live within one synchronous visit; the caller registers destination cleanup before shared copying and owns partial artifacts too.
|
|
534
|
+
func copyCLIFamilyFixture(source, destination string) error {
|
|
535
|
+
return filepath.WalkDir(source, func(path string, entry fs.DirEntry, err error) error {
|
|
536
|
+
if err != nil {
|
|
537
|
+
return err
|
|
538
|
+
}
|
|
539
|
+
rel, err := filepath.Rel(source, path)
|
|
540
|
+
if err != nil {
|
|
541
|
+
return err
|
|
542
|
+
}
|
|
543
|
+
target := filepath.Join(destination, rel)
|
|
544
|
+
if entry.IsDir() {
|
|
545
|
+
return os.MkdirAll(target, 0o755)
|
|
546
|
+
}
|
|
547
|
+
if entry.Type()&os.ModeSymlink != 0 {
|
|
548
|
+
return fmt.Errorf("fixture symlink forbidden: %s", path)
|
|
549
|
+
}
|
|
550
|
+
contents, err := os.ReadFile(path)
|
|
551
|
+
if err != nil {
|
|
552
|
+
return err
|
|
553
|
+
}
|
|
554
|
+
return os.WriteFile(target, contents, 0o644)
|
|
555
|
+
})
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
// cleanCLIFamilyOutputs runs after each shared case's original assertions;
|
|
559
|
+
// cleanup cannot turn a recorded failure into a pass or alter authored inputs.
|
|
560
|
+
//
|
|
561
|
+
// Private Go helpers retain native review grounds rather than unsupported export-host annotations.
|
|
562
|
+
// Common: Principled implementation: Original per-case assertions record failure before this cleanup removes known generated outputs, preserving later no-output prerequisites without erasing the prior failure.
|
|
563
|
+
// Common: Clear and simple design: Only declared generated index.js/bin/outside-bin paths are candidates; authored source/config paths are excluded.
|
|
564
|
+
// Common: Prohibited implementation shortcuts: No subprocess is called a unit, expected response fabricated, failure skipped or previous compiler result replayed.
|
|
565
|
+
// Common: Meaningful documentation: Native prose names actual operation, owner and limits; the caller declares fixture/config and producer observations.
|
|
566
|
+
// Portability: OS-neutral implementation: Native Go path/writer/testing APIs preserve platform semantics without shell, symlink fixtures or forced separators.
|
|
567
|
+
// Performance: Efficient algorithms: Removal visits only generated artifacts after resolving their actual absolute owner paths.
|
|
568
|
+
// Performance: Reuse equivalent work: Restored absence is a declared local lifecycle prerequisite, not compiler-result caching or cold-cache independence.
|
|
569
|
+
// Performance: Bound retention and release resources: Absolute targets must remain strictly under the owning fixture workspace before RemoveAll; resolve/remove failures remain test failures.
|
|
570
|
+
func cleanCLIFamilyOutputs(t *testing.T, workspace, root string) {
|
|
571
|
+
t.Helper()
|
|
572
|
+
for _, path := range []string{filepath.Join(root, "bin"), filepath.Join(root, "index.js"), filepath.Join(workspace, "outside-bin")} {
|
|
573
|
+
absolute, err := filepath.Abs(path)
|
|
574
|
+
if err != nil {
|
|
575
|
+
t.Errorf("output cleanup resolve: %v", err)
|
|
576
|
+
continue
|
|
577
|
+
}
|
|
578
|
+
owner, err := filepath.Abs(workspace)
|
|
579
|
+
if err != nil {
|
|
580
|
+
t.Errorf("cleanup owner resolve: %v", err)
|
|
581
|
+
continue
|
|
582
|
+
}
|
|
583
|
+
relative, err := filepath.Rel(owner, absolute)
|
|
584
|
+
if err != nil || relative == "." || relative == ".." || strings.HasPrefix(relative, ".."+string(filepath.Separator)) {
|
|
585
|
+
t.Errorf("cleanup outside owner: %s", absolute)
|
|
586
|
+
continue
|
|
587
|
+
}
|
|
588
|
+
if err := os.RemoveAll(absolute); err != nil {
|
|
589
|
+
t.Errorf("output cleanup: %v", err)
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// observeTestCLIAPICompileAndTransform verifies memory JavaScript/declaration/maps,
|
|
595
|
+
// exact source/completeness population and reference graph JSON without disk emission.
|
|
596
|
+
//
|
|
597
|
+
// The two response observations borrow one emit-capable generation. Transform preparation still independently requires ForceNoEmit; this observer does not assert a noEmit-loaded generation.
|
|
598
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
599
|
+
//
|
|
600
|
+
// 1. Request api-compile and decode its actual JSON response.
|
|
601
|
+
// 2. Check the literal bin/index.js export, empty diagnostics and disk absence.
|
|
602
|
+
// 3. Request api-transform and check index.ts source, empty diagnostics and disk absence.
|
|
603
|
+
//
|
|
604
|
+
// Testing behavioral-verification: Actual response writers carry original index42 plus baseline helper/model/isolated and legacy decorated source, JavaScript/declarations/both maps, exact completeness and connected/empty graph nodes in JSON with no disk output or diagnostics. Configured metadata appears in compiled JavaScript but not in the actual transform source records.
|
|
605
|
+
// Testing independent-expectations: Literal project-relative source/output keys, api-ok/upper/index answer syntax, authored imports and exact source population ground the assertions. Required text fragments do not constrain printer whitespace; JSON boolean presence does not independently prove native filesystem case policy.
|
|
606
|
+
// Testing distinguishing-cases: Two command adapters share one fixture; successful compile and transform are distinct from the serialized diagnostic case.
|
|
607
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
608
|
+
func observeTestCLIAPICompileAndTransform(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
609
|
+
t.Run("compile_response", func(t *testing.T) {
|
|
610
|
+
|
|
611
|
+
// The aggregate materialized the authored project once before this observer.
|
|
612
|
+
|
|
613
|
+
// Compile assertion: api-compile returns emitted JavaScript as JSON and must
|
|
614
|
+
// not write to the project outDir as a side effect.
|
|
615
|
+
code, out, errOut := invoke(t, "api-compile", "--cwd", root)
|
|
616
|
+
if code != 0 {
|
|
617
|
+
t.Fatalf("api-compile failed: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
618
|
+
}
|
|
619
|
+
var compiled cliContractCompileResult
|
|
620
|
+
if err := json.Unmarshal([]byte(strings.TrimSpace(out)), &compiled); err != nil {
|
|
621
|
+
t.Fatalf("api-compile JSON decode failed: %v\n%s", err, out)
|
|
622
|
+
}
|
|
623
|
+
if len(compiled.Diagnostics) != 0 {
|
|
624
|
+
t.Fatalf("api-compile should not report diagnostics: %#v", compiled.Diagnostics)
|
|
625
|
+
}
|
|
626
|
+
if !strings.Contains(compiled.Output["bin/index.js"], "exports.answer") {
|
|
627
|
+
t.Fatalf("api-compile output missing emitted JavaScript: %#v", compiled.Output)
|
|
628
|
+
}
|
|
629
|
+
sources := []string{"index", "src/decorated/main", "src/decorated/types", "src/helpers", "src/isolated", "src/main", "src/nested/model"}
|
|
630
|
+
if len(compiled.Output) != len(sources)*4 {
|
|
631
|
+
t.Errorf("compile output count = %d, want %d", len(compiled.Output), len(sources)*4)
|
|
632
|
+
}
|
|
633
|
+
for _, source := range sources {
|
|
634
|
+
for _, suffix := range []string{".js", ".d.ts", ".js.map", ".d.ts.map"} {
|
|
635
|
+
name := "bin/" + source + suffix
|
|
636
|
+
text, present := compiled.Output[name]
|
|
637
|
+
if !present || text == "" {
|
|
638
|
+
t.Errorf("compile memory output absent: %s", name)
|
|
639
|
+
}
|
|
640
|
+
if strings.HasSuffix(suffix, ".map") && !json.Valid([]byte(text)) {
|
|
641
|
+
t.Errorf("compile map invalid: %s", name)
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
if !strings.Contains(compiled.Output["bin/src/main.js"], "api-ok") || !strings.Contains(compiled.Output["bin/src/main.d.ts"], "upper: string") {
|
|
646
|
+
t.Error("baseline compile values/declarations absent")
|
|
647
|
+
}
|
|
648
|
+
if !regexp.MustCompile(`console\.log\(\s*message\s*\)`).MatchString(compiled.Output["bin/src/main.js"]) {
|
|
649
|
+
t.Error("baseline compiled console.log(message) call absent")
|
|
650
|
+
}
|
|
651
|
+
if !strings.Contains(compiled.Output["bin/src/decorated/main.js"], "design:type") {
|
|
652
|
+
t.Error("configured decorator metadata positive control absent from compiled JavaScript")
|
|
653
|
+
}
|
|
654
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); !os.IsNotExist(err) {
|
|
655
|
+
t.Fatalf("api-compile wrote JavaScript to disk: %v", err)
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
})
|
|
659
|
+
t.Run("transform_response", func(t *testing.T) {
|
|
660
|
+
// Transform assertion: api-transform returns parsed TypeScript source text
|
|
661
|
+
// under the same relative key style used by the TypeScript wrapper.
|
|
662
|
+
code, out, errOut := invoke(t, "api-transform", "--cwd", root)
|
|
663
|
+
if code != 0 {
|
|
664
|
+
t.Fatalf("api-transform failed: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
665
|
+
}
|
|
666
|
+
var transformed cliContractTransformResult
|
|
667
|
+
if err := json.Unmarshal([]byte(strings.TrimSpace(out)), &transformed); err != nil {
|
|
668
|
+
t.Fatalf("api-transform JSON decode failed: %v\n%s", err, out)
|
|
669
|
+
}
|
|
670
|
+
if !strings.Contains(transformed.TypeScript["index.ts"], "answer: number") {
|
|
671
|
+
t.Fatalf("api-transform source missing expected declaration: %#v", transformed.TypeScript)
|
|
672
|
+
}
|
|
673
|
+
expectedSources := []string{"index.ts", "src/decorated/main.ts", "src/decorated/types.ts", "src/helpers.ts", "src/isolated.ts", "src/main.ts", "src/nested/model.ts"}
|
|
674
|
+
actualSources := make([]string, 0, len(transformed.TypeScript))
|
|
675
|
+
for name := range transformed.TypeScript {
|
|
676
|
+
actualSources = append(actualSources, name)
|
|
677
|
+
}
|
|
678
|
+
slices.Sort(actualSources)
|
|
679
|
+
if !slices.Equal(actualSources, expectedSources) {
|
|
680
|
+
t.Errorf("transform source keys = %v, want %v", actualSources, expectedSources)
|
|
681
|
+
}
|
|
682
|
+
if !strings.Contains(transformed.TypeScript["src/main.ts"], "api-ok") || !strings.Contains(transformed.TypeScript["src/helpers.ts"], "value.toUpperCase()") || !strings.Contains(transformed.TypeScript["src/nested/model.ts"], "interface Model") || !strings.Contains(transformed.TypeScript["src/isolated.ts"], "isolated: number = 2") {
|
|
683
|
+
t.Error("baseline transform source literals absent")
|
|
684
|
+
}
|
|
685
|
+
if !regexp.MustCompile(`console\.log\(\s*message\s*\)`).MatchString(transformed.TypeScript["src/main.ts"]) {
|
|
686
|
+
t.Error("baseline source console.log(message) call absent")
|
|
687
|
+
}
|
|
688
|
+
if !strings.Contains(transformed.TypeScript["src/decorated/main.ts"], "@log()") || !strings.Contains(transformed.TypeScript["src/decorated/types.ts"], "class Payload") || strings.Contains(transformed.TypeScript["src/decorated/main.ts"], "design:type") {
|
|
689
|
+
t.Error("decorated transform source/metadata separation differs")
|
|
690
|
+
}
|
|
691
|
+
var wire map[string]json.RawMessage
|
|
692
|
+
if err := json.Unmarshal([]byte(out), &wire); err != nil {
|
|
693
|
+
t.Fatal(err)
|
|
694
|
+
}
|
|
695
|
+
var complete []string
|
|
696
|
+
if err := json.Unmarshal(wire["dependenciesComplete"], &complete); err != nil {
|
|
697
|
+
t.Fatalf("actual completeness JSON: %v", err)
|
|
698
|
+
}
|
|
699
|
+
slices.Sort(complete)
|
|
700
|
+
if !slices.Equal(complete, expectedSources) {
|
|
701
|
+
t.Errorf("native source completeness = %v, want %v", complete, expectedSources)
|
|
702
|
+
}
|
|
703
|
+
if raw, present := wire["dependencies"]; present && string(raw) != "null" {
|
|
704
|
+
t.Errorf("plugin-free dependencies should be omitted/null, got %s", raw)
|
|
705
|
+
}
|
|
706
|
+
var graph driver.TransformGraph
|
|
707
|
+
if err := json.Unmarshal(wire["graph"], &graph); err != nil {
|
|
708
|
+
t.Fatalf("actual graph JSON: %v", err)
|
|
709
|
+
}
|
|
710
|
+
edges := append([]string{}, graph.Edges["src/main.ts"]...)
|
|
711
|
+
slices.Sort(edges)
|
|
712
|
+
if !slices.Equal(edges, []string{"src/helpers.ts", "src/nested/model.ts"}) {
|
|
713
|
+
t.Errorf("baseline graph edges = %v", edges)
|
|
714
|
+
}
|
|
715
|
+
if !slices.Equal(graph.Edges["src/decorated/main.ts"], []string{"src/decorated/types.ts"}) {
|
|
716
|
+
t.Errorf("decorated type dependency edge = %v", graph.Edges["src/decorated/main.ts"])
|
|
717
|
+
}
|
|
718
|
+
for _, name := range []string{"index.ts", "src/decorated/types.ts", "src/helpers.ts", "src/isolated.ts", "src/nested/model.ts"} {
|
|
719
|
+
leaf, present := graph.Edges[name]
|
|
720
|
+
if !present || len(leaf) != 0 {
|
|
721
|
+
t.Errorf("explicit graph leaf %s = %v, present %t", name, leaf, present)
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
var graphFields map[string]json.RawMessage
|
|
725
|
+
if err := json.Unmarshal(wire["graph"], &graphFields); err != nil {
|
|
726
|
+
t.Fatal(err)
|
|
727
|
+
}
|
|
728
|
+
var casePolicy bool
|
|
729
|
+
rawPolicy, present := graphFields["useCaseSensitiveFileNames"]
|
|
730
|
+
if !present || json.Unmarshal(rawPolicy, &casePolicy) != nil {
|
|
731
|
+
t.Error("native graph case-policy JSON boolean absent")
|
|
732
|
+
}
|
|
733
|
+
if len(transformed.Diagnostics) != 0 {
|
|
734
|
+
t.Fatalf("api-transform should not report diagnostics: %#v", transformed.Diagnostics)
|
|
735
|
+
}
|
|
736
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); !os.IsNotExist(err) {
|
|
737
|
+
t.Fatalf("api-transform wrote JavaScript to disk: %v", err)
|
|
738
|
+
}
|
|
739
|
+
if _, err := os.Lstat(filepath.Join(root, "bin")); !os.IsNotExist(err) {
|
|
740
|
+
t.Errorf("memory API wrote bin directory: %v", err)
|
|
741
|
+
}
|
|
742
|
+
})
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// observeTestCLIAPICompilePreservesOutsideOutputKey verifies an absolute output key for an outDir outside the project.
|
|
746
|
+
//
|
|
747
|
+
// The outside config is selected by the visible semantic owner after original default-config argument preparation. The assertion requires a native absolute matching key, not an exact output map.
|
|
748
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
749
|
+
//
|
|
750
|
+
// 1. Invoke api-compile with the original explicit cwd arguments.
|
|
751
|
+
// 2. Decode the emitted output map and require a native absolute key ending in outside-bin/index.js.
|
|
752
|
+
//
|
|
753
|
+
// Testing behavioral-verification: api-compile returns an absolute JavaScript key ending in /outside-bin/index.js for an outDir above cwd.
|
|
754
|
+
// Testing independent-expectations: The API contract retains absolute outside-cwd outputs, independently of the emitted value; the test does not require the whole output map to have one entry.
|
|
755
|
+
// Testing distinguishing-cases: An outside outDir distinguishes this case from normal relative output keys.
|
|
756
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
757
|
+
func observeTestCLIAPICompilePreservesOutsideOutputKey(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
758
|
+
|
|
759
|
+
code, out, errOut := invoke(t, "api-compile", "--cwd", root)
|
|
760
|
+
if code != 0 {
|
|
761
|
+
t.Fatalf("api-compile failed: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
762
|
+
}
|
|
763
|
+
var compiled cliContractCompileResult
|
|
764
|
+
if err := json.Unmarshal([]byte(strings.TrimSpace(out)), &compiled); err != nil {
|
|
765
|
+
t.Fatalf("api-compile JSON decode failed: %v\n%s", err, out)
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
foundOutsideKey := false
|
|
769
|
+
for key := range compiled.Output {
|
|
770
|
+
if filepath.IsAbs(filepath.FromSlash(key)) && strings.HasSuffix(key, "/outside-bin/index.js") {
|
|
771
|
+
foundOutsideKey = true
|
|
772
|
+
break
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
if !foundOutsideKey {
|
|
776
|
+
t.Fatalf("api-compile output did not preserve an absolute outside key: %#v", compiled.Output)
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// observeTestAPITransformEnvelopeCarriesReferenceGraph verifies the reference graph relationships in the source envelope.
|
|
781
|
+
//
|
|
782
|
+
// Graph membership expectations come from authored imports, global declarations and config ancestry. Additional compiler inputs are allowed; a missing graph is rejected.
|
|
783
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
784
|
+
//
|
|
785
|
+
// 1. Request and decode the api-transform source/graph envelope.
|
|
786
|
+
// 2. Require the main.ts to mytype.ts edge and ambient.d.ts global membership.
|
|
787
|
+
// 3. Check tsconfig.json is first and tsconfig.base.json occurs in config ancestry.
|
|
788
|
+
//
|
|
789
|
+
// Testing behavioral-verification: api-transform returns the main.ts to mytype.ts type-only edge, ambient.d.ts global and selected plus extended configuration paths.
|
|
790
|
+
// Testing independent-expectations: Literal fixture relationships define the expected graph; membership assertions allow unrelated additional compiler inputs.
|
|
791
|
+
// Testing distinguishing-cases: The fixture combines a type-only edge, ambient global and extends chain; a missing graph fails before its three independent fields are inspected.
|
|
792
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
793
|
+
func observeTestAPITransformEnvelopeCarriesReferenceGraph(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
794
|
+
|
|
795
|
+
code, out, errOut := invoke(t, "api-transform", "--cwd", root)
|
|
796
|
+
if code != 0 {
|
|
797
|
+
t.Fatalf("api-transform failed: code=%d stderr=%q", code, errOut)
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
var result apiTransformResultWithGraph
|
|
801
|
+
if err := json.Unmarshal([]byte(strings.TrimSpace(out)), &result); err != nil {
|
|
802
|
+
t.Fatalf("envelope is not valid JSON: %v\nstdout=%q", err, out)
|
|
803
|
+
}
|
|
804
|
+
if result.Graph == nil {
|
|
805
|
+
t.Fatalf("envelope has no graph section: %q", out)
|
|
806
|
+
}
|
|
807
|
+
if !slices.Contains(result.Graph.Edges["main.ts"], "mytype.ts") {
|
|
808
|
+
t.Fatalf("type-only edge main.ts -> mytype.ts missing: %v", result.Graph.Edges)
|
|
809
|
+
}
|
|
810
|
+
if !slices.Contains(result.Graph.Globals, "ambient.d.ts") {
|
|
811
|
+
t.Fatalf("globals missing ambient.d.ts: %v", result.Graph.Globals)
|
|
812
|
+
}
|
|
813
|
+
if len(result.Graph.Configs) < 2 || result.Graph.Configs[0] != "tsconfig.json" {
|
|
814
|
+
t.Fatalf("configs must start with tsconfig.json and include its extends chain: %v", result.Graph.Configs)
|
|
815
|
+
}
|
|
816
|
+
if !slices.ContainsFunc(result.Graph.Configs, func(config string) bool {
|
|
817
|
+
return strings.HasSuffix(config, "tsconfig.base.json")
|
|
818
|
+
}) {
|
|
819
|
+
t.Fatalf("configs missing extended tsconfig.base.json: %v", result.Graph.Configs)
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
// observeTestCLIAPITransformUsesCurrentDirectory verifies source selection with omitted cwd.
|
|
824
|
+
//
|
|
825
|
+
// The actual process cwd is changed and restored by the owner; the response is not supplied by a fake cwd resolver.
|
|
826
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
827
|
+
//
|
|
828
|
+
// 1. Change the actual cwd to the fixture root and invoke api-transform without a cwd flag.
|
|
829
|
+
// 2. Decode the response and require value: number in index.ts.
|
|
830
|
+
//
|
|
831
|
+
// Testing behavioral-verification: api-transform without --cwd returns the index.ts declaration from the current process fixture directory.
|
|
832
|
+
// Testing independent-expectations: The authored source declaration and project-relative key define the response, independently of the adapter implementation.
|
|
833
|
+
// Testing distinguishing-cases: Omitting --cwd and setting the process directory exercises the implicit cwd path rather than the explicit override used by sibling API cases.
|
|
834
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
835
|
+
func observeTestCLIAPITransformUsesCurrentDirectory(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
836
|
+
|
|
837
|
+
code, out, errOut := invokeInCurrentDirectory(t, root, invoke, "api-transform")
|
|
838
|
+
if code != 0 {
|
|
839
|
+
t.Fatalf("api-transform from cwd failed: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
840
|
+
}
|
|
841
|
+
var transformed cliContractTransformResult
|
|
842
|
+
if err := json.Unmarshal([]byte(strings.TrimSpace(out)), &transformed); err != nil {
|
|
843
|
+
t.Fatalf("api-transform JSON decode failed: %v\n%s", err, out)
|
|
844
|
+
}
|
|
845
|
+
if !strings.Contains(transformed.TypeScript["index.ts"], "value: number") {
|
|
846
|
+
t.Fatalf("api-transform did not return cwd project source: %#v", transformed.TypeScript)
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// observeTestCLICommandAcceptsFlagShapedBuildAlias verifies successful build dispatch for a leading cwd flag.
|
|
851
|
+
//
|
|
852
|
+
// The owner independently checks original preparation before loading its immutable flag-shaped semantic variant. This observer checks success status only.
|
|
853
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
854
|
+
//
|
|
855
|
+
// 1. Invoke the leading --cwd argv with --noEmit.
|
|
856
|
+
// 2. Require status zero while retaining streams in a failure report.
|
|
857
|
+
//
|
|
858
|
+
// Testing behavioral-verification: A leading --cwd flag followed by --noEmit selects project build and returns status zero.
|
|
859
|
+
// Testing independent-expectations: The native front door contract accepts compiler-shaped flags without the build word; this body checks acceptance only, not the emitted filesystem.
|
|
860
|
+
// Testing distinguishing-cases: A leading flag is distinct from explicit build and unsupported command labels.
|
|
861
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
862
|
+
func observeTestCLICommandAcceptsFlagShapedBuildAlias(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
863
|
+
|
|
864
|
+
code, out, errOut := invoke(t, "--cwd", root, "--noEmit")
|
|
865
|
+
if code != 0 {
|
|
866
|
+
t.Fatalf("flag-shaped build alias failed: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
// observeTestCLICommandCheckAliasSuppressesEmit verifies successful check with no JavaScript publication.
|
|
871
|
+
//
|
|
872
|
+
// The selected config permits emit, so actual ForceNoEmit compilation must preserve output absence. The manifest case owns a separate immutable emit-capable Program.
|
|
873
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
874
|
+
//
|
|
875
|
+
// 1. Invoke check with the explicit fixture cwd.
|
|
876
|
+
// 2. Require status zero and absence of bin/index.js.
|
|
877
|
+
//
|
|
878
|
+
// Testing behavioral-verification: check succeeds for a compilable outDir project and does not create bin/index.js.
|
|
879
|
+
// Testing independent-expectations: The documented check alias is analysis-only even when the configuration supports output; no output is a filesystem observation, not source inspection.
|
|
880
|
+
// Testing distinguishing-cases: The positive project makes an accidental emit observable; forced successful emit is covered by the manifest unit case.
|
|
881
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
882
|
+
func observeTestCLICommandCheckAliasSuppressesEmit(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
883
|
+
|
|
884
|
+
code, out, errOut := invoke(t, "check", "--cwd", root)
|
|
885
|
+
if code != 0 {
|
|
886
|
+
t.Fatalf("check alias failed: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
887
|
+
}
|
|
888
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); !os.IsNotExist(err) {
|
|
889
|
+
t.Fatalf("check alias should not emit JavaScript: %v", err)
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// observeTestCLICommandHelpAliases verifies help text for all three literal help aliases.
|
|
894
|
+
//
|
|
895
|
+
// Each alias executes the real dispatcher separately. The focused text oracle checks documented sections and excludes demo rather than copying the entire help output.
|
|
896
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
897
|
+
//
|
|
898
|
+
// 1. Invoke -h, --help and help under separate named children.
|
|
899
|
+
// 2. Require status zero, Project build: and version text, and no demo text.
|
|
900
|
+
//
|
|
901
|
+
// Testing behavioral-verification: -h, --help and help return zero with Project build: and version text and without demo.
|
|
902
|
+
// Testing independent-expectations: The native CLI command surface supplies literal help fragments; the checks permit unrelated extra text and do not enforce empty stderr.
|
|
903
|
+
// Testing distinguishing-cases: Three named alias subtests cover every help input with the Project build and no-demo assertions, plus a version fragment check.
|
|
904
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
905
|
+
func observeTestCLICommandHelpAliases(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
906
|
+
for _, flag := range []string{"-h", "--help", "help"} {
|
|
907
|
+
t.Run(flag, func(t *testing.T) {
|
|
908
|
+
code, out, errOut := invoke(t, flag)
|
|
909
|
+
if code != 0 {
|
|
910
|
+
t.Fatalf("%s help alias failed: code=%d stdout=%q stderr=%q", flag, code, out, errOut)
|
|
911
|
+
}
|
|
912
|
+
if !strings.Contains(out, "Project build:") || !strings.Contains(out, "version") || strings.Contains(out, "demo") {
|
|
913
|
+
t.Fatalf("%s help output missing expected sections:\n%s", flag, out)
|
|
914
|
+
}
|
|
915
|
+
})
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
// observeTestCLICommandRejectsConflictingEmitFlags verifies the mutually exclusive emit flag diagnostic.
|
|
920
|
+
//
|
|
921
|
+
// Argument rejection needs no authored project or compiler Program. The literal stderr phrase distinguishes this rejection from unrelated status-two failures.
|
|
922
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
923
|
+
//
|
|
924
|
+
// 1. Invoke build with both --emit and --noEmit.
|
|
925
|
+
// 2. Require status two and mutually exclusive in stderr.
|
|
926
|
+
//
|
|
927
|
+
// Testing behavioral-verification: build with --emit and --noEmit returns usage status two and a mutually exclusive diagnostic.
|
|
928
|
+
// Testing independent-expectations: Mutually exclusive command intent defines rejection before any fixture project is needed.
|
|
929
|
+
// Testing distinguishing-cases: The contradictory pair distinguishes usage rejection from successful emit or noEmit; missing project operands have separate cases.
|
|
930
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
931
|
+
func observeTestCLICommandRejectsConflictingEmitFlags(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
932
|
+
code, out, errOut := invoke(t, "build", "--emit", "--noEmit")
|
|
933
|
+
if code != 2 {
|
|
934
|
+
t.Fatalf("conflicting emit flags should fail: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
935
|
+
}
|
|
936
|
+
if !strings.Contains(errOut, "mutually exclusive") {
|
|
937
|
+
t.Fatalf("conflicting emit diagnostic missing mutual-exclusion text: %q", errOut)
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// observeTestCLICommandRejectsMissingProjectArgument verifies missing operands for both project aliases.
|
|
942
|
+
//
|
|
943
|
+
// Each literal alias has its own named failure identity. The requires a path argument diagnostic distinguishes missing operands from unknown commands.
|
|
944
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
945
|
+
//
|
|
946
|
+
// 1. Invoke -p and --project without operands in separate children.
|
|
947
|
+
// 2. Require status two and the literal path-argument diagnostic for each.
|
|
948
|
+
//
|
|
949
|
+
// Testing behavioral-verification: -p and --project without a path each return status two and a requires a path argument diagnostic.
|
|
950
|
+
// Testing independent-expectations: Both project selectors require an operand by their public argv contract; expected error text is a literal contract fragment.
|
|
951
|
+
// Testing distinguishing-cases: Named subtests cover both missing-value aliases; the valid absolute-path pair is tested separately.
|
|
952
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
953
|
+
func observeTestCLICommandRejectsMissingProjectArgument(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
954
|
+
for _, flag := range []string{"-p", "--project"} {
|
|
955
|
+
t.Run(flag, func(t *testing.T) {
|
|
956
|
+
code, out, errOut := invoke(t, flag)
|
|
957
|
+
if code != 2 {
|
|
958
|
+
t.Fatalf("%s without path should fail: code=%d stdout=%q stderr=%q", flag, code, out, errOut)
|
|
959
|
+
}
|
|
960
|
+
if !strings.Contains(errOut, "requires a path argument") {
|
|
961
|
+
t.Fatalf("%s diagnostic missing required-path text: %q", flag, errOut)
|
|
962
|
+
}
|
|
963
|
+
})
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
// observeTestCLICommandRejectsUnknown verifies the unknown command diagnostic and help hint.
|
|
968
|
+
//
|
|
969
|
+
// The demo command does not materialize a project. This observer checks status and stderr text without claiming empty stdout.
|
|
970
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
971
|
+
//
|
|
972
|
+
// 1. Invoke the literal demo command.
|
|
973
|
+
// 2. Require status two plus unknown command and --help in stderr.
|
|
974
|
+
//
|
|
975
|
+
// Testing behavioral-verification: demo returns status two with unknown command and --help diagnostic fragments.
|
|
976
|
+
// Testing independent-expectations: An unsupported non-file command label is a usage error; literal diagnostic fragments distinguish dispatch from compiler diagnostics.
|
|
977
|
+
// Testing distinguishing-cases: A demo label is rejected, while the distinct fly-to-mars unknown case additionally checks empty stdout.
|
|
978
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
979
|
+
func observeTestCLICommandRejectsUnknown(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
980
|
+
code, out, errOut := invoke(t, "demo")
|
|
981
|
+
if code != 2 {
|
|
982
|
+
t.Fatalf("unknown command should fail: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
983
|
+
}
|
|
984
|
+
if !strings.Contains(errOut, "unknown command") || !strings.Contains(errOut, "--help") {
|
|
985
|
+
t.Fatalf("unknown command diagnostic missing expected text: %q", errOut)
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
// observeTestCLICommandRunsProjectFromCurrentDirectory verifies default project execution from actual cwd.
|
|
990
|
+
//
|
|
991
|
+
// No argv is supplied, so real cwd lookup selects the authored noEmit config. The focused stdout check distinguishes compilation from printing usage.
|
|
992
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
993
|
+
//
|
|
994
|
+
// 1. Change the actual cwd to the fixture and invoke with no arguments.
|
|
995
|
+
// 2. Require status zero and absence of Usage: in stdout.
|
|
996
|
+
//
|
|
997
|
+
// Testing behavioral-verification: Actual empty-argv dispatch and native Program operation succeed from the noEmit fixture directory with both quiet streams empty; this is a returned-status unit, not an OS child receipt.
|
|
998
|
+
// Testing independent-expectations: The no-argument compiler front door builds its cwd project rather than printing help; the authored valid fixture makes that observable.
|
|
999
|
+
// Testing distinguishing-cases: Empty argv differs from explicit help and explicit --cwd. Its noEmit profile owns quiet returned streams; marker42 output belongs to the existing emitting profile rather than a claimed default-config emit here.
|
|
1000
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1001
|
+
func observeTestCLICommandRunsProjectFromCurrentDirectory(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1002
|
+
|
|
1003
|
+
code, out, errOut := invokeInCurrentDirectory(t, root, invoke)
|
|
1004
|
+
if code != 0 {
|
|
1005
|
+
t.Fatalf("bare command should build cwd project: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
1006
|
+
}
|
|
1007
|
+
if strings.Contains(out, "Usage:") {
|
|
1008
|
+
t.Fatalf("bare command should not print help usage: %q", out)
|
|
1009
|
+
}
|
|
1010
|
+
if out != "" || errOut != "" {
|
|
1011
|
+
t.Fatalf("bare quiet command streams: stdout=%q stderr=%q", out, errOut)
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
// observeTestCLICommandVersionAliases verifies version metadata text for all literal aliases.
|
|
1016
|
+
//
|
|
1017
|
+
// Metadata values remain actual runtime values. Independent marker expectations check the output shape without generating expected text from those values.
|
|
1018
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1019
|
+
//
|
|
1020
|
+
// 1. Invoke -v, --version and version under separate named children.
|
|
1021
|
+
// 2. Require status zero and the ttsc, commit and go markers.
|
|
1022
|
+
//
|
|
1023
|
+
// Testing behavioral-verification: -v, --version and version each return zero and include ttsc, commit and go metadata fragments.
|
|
1024
|
+
// Testing independent-expectations: The native build metadata contract defines field presence; variable release values are intentionally not copied from the binary.
|
|
1025
|
+
// Testing distinguishing-cases: Three named alias subtests cover every version input and metadata fragment; requiring go followed by a space is stricter than a bare go substring.
|
|
1026
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1027
|
+
func observeTestCLICommandVersionAliases(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1028
|
+
for _, flag := range []string{"-v", "--version", "version"} {
|
|
1029
|
+
t.Run(flag, func(t *testing.T) {
|
|
1030
|
+
code, out, errOut := invoke(t, flag)
|
|
1031
|
+
if code != 0 {
|
|
1032
|
+
t.Fatalf("%s version alias failed: code=%d stdout=%q stderr=%q", flag, code, out, errOut)
|
|
1033
|
+
}
|
|
1034
|
+
for _, expected := range []string{"ttsc ", "commit", "go "} {
|
|
1035
|
+
if !strings.Contains(out, expected) {
|
|
1036
|
+
t.Fatalf("%s version output missing %q:\n%s", flag, expected, out)
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
})
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
// observeTestCLIProjectBuildAllowsUnusedTypeParametersOnOverloadSignatures verifies publication despite an unused overload-only type parameter.
|
|
1044
|
+
//
|
|
1045
|
+
// The implementation uses its parameter while the overload signature has a type parameter. This distinguishes declaration-only generic usage from the rejected unused implementation parameter case.
|
|
1046
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1047
|
+
//
|
|
1048
|
+
// 1. Build the authored overload fixture with forced emit.
|
|
1049
|
+
// 2. Require success and no unused-parameter/type-parameter diagnostic phrases.
|
|
1050
|
+
// 3. Require bin/index.js to exist.
|
|
1051
|
+
//
|
|
1052
|
+
// Testing behavioral-verification: Forced emit accepts an overload-only unused type parameter, produces index.js and emits no unused-type-parameter message.
|
|
1053
|
+
// Testing independent-expectations: TypeScript permits type parameters used solely by overload declarations; actual output and forbidden diagnostics establish acceptance independently of filtering logic.
|
|
1054
|
+
// Testing distinguishing-cases: An overload signature and used implementation parameter are the positive case; an unused implementation parameter is rejected by sibling cases.
|
|
1055
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1056
|
+
func observeTestCLIProjectBuildAllowsUnusedTypeParametersOnOverloadSignatures(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1057
|
+
|
|
1058
|
+
code, _, stderr := invoke(t, "build", "--cwd", root, "--emit", "--quiet")
|
|
1059
|
+
if code != 0 {
|
|
1060
|
+
t.Fatalf("build failed: code=%d stderr=%q", code, stderr)
|
|
1061
|
+
}
|
|
1062
|
+
if strings.Contains(stderr, "declared but never used") || strings.Contains(stderr, "All type parameters are unused") {
|
|
1063
|
+
t.Fatalf("overload signature type parameters must not fail noUnused checks: %q", stderr)
|
|
1064
|
+
}
|
|
1065
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); err != nil {
|
|
1066
|
+
t.Fatalf("expected emitted JS: %v", err)
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
// observeTestCLIProjectBuildBlocksSemanticDiagnostics verifies no publication after a semantic type error.
|
|
1071
|
+
//
|
|
1072
|
+
// The number-to-string assignment is authored invalid input. Its literal diagnostic and output absence distinguish semantic rejection from an unrelated nonzero exit.
|
|
1073
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1074
|
+
//
|
|
1075
|
+
// 1. Build the semantic-invalid fixture with emit requested.
|
|
1076
|
+
// 2. Require status two and the number-to-string assignment diagnostic.
|
|
1077
|
+
// 3. Require bin/index.js to remain absent.
|
|
1078
|
+
//
|
|
1079
|
+
// Testing behavioral-verification: build --emit rejects a number-to-string assignment with status two, its semantic diagnostic and no index.js.
|
|
1080
|
+
// Testing independent-expectations: The independently invalid assignment and pre-emit diagnostic contract define rejection and the observable absence of output.
|
|
1081
|
+
// Testing distinguishing-cases: Valid syntax isolates semantic failure; parse failure and accepted overloads are exercised separately.
|
|
1082
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1083
|
+
func observeTestCLIProjectBuildBlocksSemanticDiagnostics(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1084
|
+
|
|
1085
|
+
// Scenario setup: using a semantic type mismatch exercises the checker path,
|
|
1086
|
+
// not only the config parser or syntax parser.
|
|
1087
|
+
|
|
1088
|
+
// Failure assertion: the command must reject before WriteFile can create the
|
|
1089
|
+
// configured output path.
|
|
1090
|
+
code, _, errOut := invoke(t, "build", "--cwd", root, "--emit")
|
|
1091
|
+
if code != 2 {
|
|
1092
|
+
t.Fatalf("semantic build should fail: code=%d stderr=%q", code, errOut)
|
|
1093
|
+
}
|
|
1094
|
+
if !strings.Contains(errOut, "Type 'number' is not assignable to type 'string'") {
|
|
1095
|
+
t.Fatalf("semantic diagnostic missing expected message: %q", errOut)
|
|
1096
|
+
}
|
|
1097
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); !os.IsNotExist(err) {
|
|
1098
|
+
t.Fatalf("semantic failure should not emit JavaScript: %v", err)
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
// observeTestCLIProjectBuildBlocksSyntacticDiagnostics verifies no publication after a malformed variable declaration.
|
|
1103
|
+
//
|
|
1104
|
+
// Valid preceding code cannot justify partial JavaScript publication when the later declaration is syntactically invalid. The retained literal diagnostic identifies that branch.
|
|
1105
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1106
|
+
//
|
|
1107
|
+
// 1. Build the fixture containing the malformed const declaration.
|
|
1108
|
+
// 2. Require status two and Variable declaration expected in stderr.
|
|
1109
|
+
// 3. Require bin/index.js to remain absent.
|
|
1110
|
+
//
|
|
1111
|
+
// Testing behavioral-verification: build --emit rejects const = ; with status two, Variable declaration expected and no index.js.
|
|
1112
|
+
// Testing independent-expectations: The malformed declaration violates TypeScript grammar and must block forced output; filesystem absence is observed after direct dispatch completes.
|
|
1113
|
+
// Testing distinguishing-cases: Valid preceding console code does not permit partial output.
|
|
1114
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1115
|
+
func observeTestCLIProjectBuildBlocksSyntacticDiagnostics(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1116
|
+
|
|
1117
|
+
code, _, errOut := invoke(t, "build", "--cwd", root, "--emit")
|
|
1118
|
+
if code != 2 {
|
|
1119
|
+
t.Fatalf("syntactic build should fail: code=%d stderr=%q", code, errOut)
|
|
1120
|
+
}
|
|
1121
|
+
if !strings.Contains(errOut, "Variable declaration expected") {
|
|
1122
|
+
t.Fatalf("syntactic diagnostic missing expected message: %q", errOut)
|
|
1123
|
+
}
|
|
1124
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); !os.IsNotExist(err) {
|
|
1125
|
+
t.Fatalf("syntactic failure should not emit JavaScript: %v", err)
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
// observeTestCLIProjectBuildBlocksUnusedParameters verifies no publication after an unused implementation parameter.
|
|
1130
|
+
//
|
|
1131
|
+
// The diagnostic accepts two existing upstream wordings for the same unused parameter. Output absence remains an independent assertion rather than following from status alone.
|
|
1132
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1133
|
+
//
|
|
1134
|
+
// 1. Build the fixture with the unused implementation parameter.
|
|
1135
|
+
// 2. Require status two and one of the two retained unused diagnostic phrases.
|
|
1136
|
+
// 3. Require bin/index.js to remain absent.
|
|
1137
|
+
//
|
|
1138
|
+
// Testing behavioral-verification: build --emit rejects an unused implementation parameter with status two, an unused diagnostic and no index.js.
|
|
1139
|
+
// Testing independent-expectations: noUnusedParameters defines the negative compiler case; either supported diagnostic rendering is accepted without generating an expectation from the implementation.
|
|
1140
|
+
// Testing distinguishing-cases: The real unused implementation parameter differs from permitted overload type parameters.
|
|
1141
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1142
|
+
func observeTestCLIProjectBuildBlocksUnusedParameters(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1143
|
+
|
|
1144
|
+
code, _, errOut := invoke(t, "build", "--cwd", root, "--emit")
|
|
1145
|
+
if code != 2 {
|
|
1146
|
+
t.Fatalf("unused-parameter build should fail: code=%d stderr=%q", code, errOut)
|
|
1147
|
+
}
|
|
1148
|
+
if !strings.Contains(errOut, "'unused' is declared but its value is never read") &&
|
|
1149
|
+
!strings.Contains(errOut, "'unused' is declared but never used") {
|
|
1150
|
+
t.Fatalf("unused-parameter diagnostic missing expected message: %q", errOut)
|
|
1151
|
+
}
|
|
1152
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); !os.IsNotExist(err) {
|
|
1153
|
+
t.Fatalf("unused-parameter failure should not emit JavaScript: %v", err)
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
// observeTestCLIProjectBuildEmitErrorRejectsManifest verifies manifest absence after declaration emission fails.
|
|
1158
|
+
//
|
|
1159
|
+
// The anonymous exported class has a private hidden member that triggers TS4094. A failed emit may have partial outputs; this observer specifically rejects publication of a complete-build manifest.
|
|
1160
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1161
|
+
//
|
|
1162
|
+
// 1. Build with declaration emission and a requested manifest path.
|
|
1163
|
+
// 2. Require nonzero status plus error, TS4094, emit failed and incomplete-build diagnostics.
|
|
1164
|
+
// 3. Require the manifest path to remain absent.
|
|
1165
|
+
//
|
|
1166
|
+
// Testing behavioral-verification: Declaration emit of an exported anonymous class with a private field fails, reports TS4094 plus incomplete-build context and publishes no manifest.
|
|
1167
|
+
// Testing independent-expectations: TypeScript declaration visibility rules supply the independently invalid emit; a success manifest would falsely certify a failed output generation.
|
|
1168
|
+
// Testing distinguishing-cases: An emit-only diagnostic differs from earlier source semantic or syntactic rejection; nonzero status is allowed to be any failure code.
|
|
1169
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1170
|
+
func observeTestCLIProjectBuildEmitErrorRejectsManifest(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1171
|
+
|
|
1172
|
+
manifest := filepath.Join(root, "manifest.json")
|
|
1173
|
+
code, out, errOut := invoke(t, "build", "--cwd", root, "--emit", "--manifest", manifest)
|
|
1174
|
+
if code == 0 {
|
|
1175
|
+
t.Fatalf("build succeeded: %s %s", out, errOut)
|
|
1176
|
+
}
|
|
1177
|
+
for _, text := range []string{"error", "TS4094", "ttsc: emit failed", "build output is incomplete"} {
|
|
1178
|
+
if !strings.Contains(errOut, text) {
|
|
1179
|
+
t.Fatalf("missing %q: %s", text, errOut)
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
if _, err := os.Stat(manifest); !os.IsNotExist(err) {
|
|
1183
|
+
t.Fatalf("incomplete build published a manifest: %v", err)
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
// observeTestCLIProjectBuildEmitsManifest verifies successful JavaScript and manifest publication.
|
|
1188
|
+
//
|
|
1189
|
+
// This shared case publishes last after no-output observations. The manifest oracle permits additional outputs while retaining the first JavaScript path suffix and nonempty list.
|
|
1190
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1191
|
+
//
|
|
1192
|
+
// 1. Build the valid project with emit, verbose and manifest flags.
|
|
1193
|
+
// 2. Require status zero, emitted= text and bin/index.js existence.
|
|
1194
|
+
// 3. Decode the manifest and require a nonempty output list beginning with bin/index.js.
|
|
1195
|
+
//
|
|
1196
|
+
// Testing behavioral-verification: Successful verbose build --emit creates index.js containing the authored exports.marker/42 value, prints emitted= and writes a JSON manifest containing its output path. This emitting profile is distinct from the quiet noEmit default profile.
|
|
1197
|
+
// Testing independent-expectations: The authored outDir and manifest contract provide independent path expectations; membership/count checks do not require exact verbose text or reject additional outputs.
|
|
1198
|
+
// Testing distinguishing-cases: The valid emitting project is the positive publication path; the TS4094 case rejects a success manifest.
|
|
1199
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1200
|
+
func observeTestCLIProjectBuildEmitsManifest(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1201
|
+
|
|
1202
|
+
// Scenario setup: the manifest only has meaning when the compiler writes a
|
|
1203
|
+
// real output file, so the fixture uses `--emit` with a configured outDir.
|
|
1204
|
+
|
|
1205
|
+
manifest := filepath.Join(root, "manifest.json")
|
|
1206
|
+
|
|
1207
|
+
// Build assertion: verbose output names the emitted count while the manifest
|
|
1208
|
+
// remains a machine-readable file list for wrapper callers.
|
|
1209
|
+
code, out, errOut := invoke(t, "build", "--cwd", root, "--emit", "--verbose", "--manifest", manifest)
|
|
1210
|
+
if code != 0 {
|
|
1211
|
+
t.Fatalf("build failed: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
1212
|
+
}
|
|
1213
|
+
if !strings.Contains(out, "emitted=") {
|
|
1214
|
+
t.Fatalf("verbose build output missing emitted count: %q", out)
|
|
1215
|
+
}
|
|
1216
|
+
if _, err := os.Stat(filepath.Join(root, "bin", "index.js")); err != nil {
|
|
1217
|
+
t.Fatalf("expected emitted JavaScript: %v", err)
|
|
1218
|
+
}
|
|
1219
|
+
javascript, err := os.ReadFile(filepath.Join(root, "bin", "index.js"))
|
|
1220
|
+
if err != nil || !strings.Contains(string(javascript), "exports.marker") || !strings.Contains(string(javascript), "42") {
|
|
1221
|
+
t.Fatalf("compiled marker literal = %q, %v", javascript, err)
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
raw, err := os.ReadFile(manifest)
|
|
1225
|
+
if err != nil {
|
|
1226
|
+
t.Fatal(err)
|
|
1227
|
+
}
|
|
1228
|
+
var files []string
|
|
1229
|
+
if err := json.Unmarshal(raw, &files); err != nil {
|
|
1230
|
+
t.Fatalf("manifest JSON decode failed: %v\n%s", err, raw)
|
|
1231
|
+
}
|
|
1232
|
+
if len(files) == 0 || !strings.HasSuffix(filepath.ToSlash(files[0]), "bin/index.js") {
|
|
1233
|
+
t.Fatalf("manifest did not include emitted JavaScript: %#v", files)
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
// observeTestCLIReportsDiagnosticsWithoutEmit verifies serialized error diagnostics from source transformation.
|
|
1238
|
+
//
|
|
1239
|
+
// The transform response remains valid JSON even though the authored type error makes status nonzero. The category oracle does not claim an exact complete diagnostic list.
|
|
1240
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1241
|
+
//
|
|
1242
|
+
// 1. Invoke api-transform on the invalid type fixture.
|
|
1243
|
+
// 2. Require status two and decode the actual JSON diagnostics.
|
|
1244
|
+
// 3. Require a nonempty list whose first category is error.
|
|
1245
|
+
//
|
|
1246
|
+
// Testing behavioral-verification: api-transform returns failure status two while stdout retains JSON with an error diagnostic for a number-to-string assignment.
|
|
1247
|
+
// Testing independent-expectations: The API envelope contract preserves machine-readable diagnostics on failure; the authored invalid assignment provides an independent negative input.
|
|
1248
|
+
// Testing distinguishing-cases: Failure with a usable JSON envelope distinguishes this adapter from stderr-only build rejection; exact diagnostic text and the complete diagnostic list are not asserted.
|
|
1249
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1250
|
+
func observeTestCLIReportsDiagnosticsWithoutEmit(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1251
|
+
|
|
1252
|
+
// Scenario setup: one strict type error is enough to exercise the diagnostic
|
|
1253
|
+
// path while keeping the expected JSON result small and deterministic.
|
|
1254
|
+
|
|
1255
|
+
// Diagnostic assertion: the owning run dispatcher executes directly, so this
|
|
1256
|
+
// checks its returned status rather than an OS child exit code.
|
|
1257
|
+
code, out, errOut := invoke(t, "api-transform", "--cwd", root)
|
|
1258
|
+
if code != 2 {
|
|
1259
|
+
t.Fatalf("api-transform should fail with diagnostics: code=%d stdout=%q stderr=%q", code, out, errOut)
|
|
1260
|
+
}
|
|
1261
|
+
var transformed cliContractTransformResult
|
|
1262
|
+
if err := json.Unmarshal([]byte(strings.TrimSpace(out)), &transformed); err != nil {
|
|
1263
|
+
t.Fatalf("diagnostic JSON decode failed: %v\nstdout=%s\nstderr=%s", err, out, errOut)
|
|
1264
|
+
}
|
|
1265
|
+
if len(transformed.Diagnostics) == 0 || transformed.Diagnostics[0].Category != "error" {
|
|
1266
|
+
t.Fatalf("expected serialized error diagnostics: %#v", transformed.Diagnostics)
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
// observeTestCLIRunUnknownCommandExits2 verifies empty stdout and an unknown-command error.
|
|
1271
|
+
//
|
|
1272
|
+
// The literal fly-to-mars input distinguishes this focused rejection from positive command execution. This direct unit observes the returned status, not native os.Exit transport.
|
|
1273
|
+
// Fixture materialization and the visible execution owner remain outside this observer.
|
|
1274
|
+
//
|
|
1275
|
+
// 1. Invoke fly-to-mars through the supplied actual dispatcher.
|
|
1276
|
+
// 2. Require status two, empty stdout and unknown command in stderr.
|
|
1277
|
+
//
|
|
1278
|
+
// Testing behavioral-verification: fly-to-mars returns status two, empty stdout and an unknown command stderr fragment.
|
|
1279
|
+
// Testing independent-expectations: An unsupported command label is a usage error; empty stdout separates command failure from a JSON result or help response.
|
|
1280
|
+
// Testing distinguishing-cases: This distinct unknown label complements demo rejection and adds the empty stdout assertion.
|
|
1281
|
+
// Testing execution-ownership: The named aggregate supplies the declared fixture and actual closure; this observer owns only original argv/result assertions. Preparation and borrowed semantic execution are explicitly separated by that owner, and no response is replayed.
|
|
1282
|
+
func observeTestCLIRunUnknownCommandExits2(t *testing.T, root string, invoke func(*testing.T, ...string) (int, string, string)) {
|
|
1283
|
+
code, stdout, stderr := invoke(t, "fly-to-mars")
|
|
1284
|
+
if code != 2 || stdout != "" || !strings.Contains(stderr, "unknown command") || !strings.Contains(stderr, "fly-to-mars") || !strings.Contains(stderr, "--help") {
|
|
1285
|
+
t.Fatalf("unknown command mismatch: code=%d stdout=%q stderr=%q", code, stdout, stderr)
|
|
1286
|
+
}
|
|
1287
|
+
}
|