@angular/compiler-cli 13.0.0-next.9 → 13.0.0-rc.3
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/bundles/index.js +20413 -0
- package/bundles/index.js.map +6 -0
- package/bundles/linker/babel/index.js +2384 -0
- package/bundles/linker/babel/index.js.map +6 -0
- package/bundles/linker/index.js +1849 -0
- package/bundles/linker/index.js.map +6 -0
- package/bundles/ngcc/index.js +16038 -0
- package/bundles/ngcc/index.js.map +6 -0
- package/bundles/ngcc/main-ngcc.js +16126 -0
- package/bundles/ngcc/main-ngcc.js.map +6 -0
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13850 -0
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +6 -0
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +334 -0
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +6 -0
- package/bundles/private/bazel.js +97 -0
- package/bundles/private/bazel.js.map +6 -0
- package/bundles/private/localize.js +911 -0
- package/bundles/private/localize.js.map +6 -0
- package/bundles/private/migrations.js +2183 -0
- package/bundles/private/migrations.js.map +6 -0
- package/bundles/private/tooling.js +942 -0
- package/bundles/private/tooling.js.map +6 -0
- package/bundles/src/bin/ng_xi18n.js +20463 -0
- package/bundles/src/bin/ng_xi18n.js.map +6 -0
- package/bundles/src/bin/ngc.js +20465 -0
- package/bundles/src/bin/ngc.js.map +6 -0
- package/bundles_metadata.json +1 -0
- package/import_meta_url.d.ts +14 -0
- package/index.d.ts +4 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +1 -8
- package/linker/babel/src/ast/babel_ast_host.d.ts +1 -1
- package/linker/babel/src/babel_core.d.ts +36 -0
- package/linker/babel/src/babel_declaration_scope.d.ts +1 -1
- package/linker/babel/src/babel_plugin.d.ts +1 -8
- package/linker/babel/src/es2015_linker_plugin.d.ts +2 -2
- package/linker/src/ast/typescript/typescript_ast_host.d.ts +1 -1
- package/linker/src/file_linker/emit_scopes/emit_scope.d.ts +1 -2
- package/linker/src/file_linker/emit_scopes/iife_emit_scope.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_component_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_factory_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_injectable_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_injector_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_linker.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +1 -2
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -2
- package/ngcc/index.d.ts +15 -0
- package/ngcc/src/analysis/decoration_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/module_with_providers_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/ngcc_references_registry.d.ts +1 -1
- package/ngcc/src/analysis/ngcc_trait_compiler.d.ts +1 -1
- package/ngcc/src/analysis/private_declarations_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/switch_marker_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/types.d.ts +1 -1
- package/ngcc/src/dependencies/esm_dependency_host.d.ts +1 -1
- package/ngcc/src/execution/cluster/api.d.ts +5 -1
- package/ngcc/src/execution/cluster/master.d.ts +5 -3
- package/{src/ngtsc/logging/testing/index.d.ts → ngcc/src/execution/cluster/ngcc_cluster_worker.d.ts} +2 -2
- package/ngcc/src/host/commonjs_host.d.ts +1 -1
- package/ngcc/src/host/commonjs_umd_utils.d.ts +1 -1
- package/ngcc/src/host/delegating_host.d.ts +1 -1
- package/ngcc/src/host/esm2015_host.d.ts +1 -1
- package/ngcc/src/host/esm5_host.d.ts +1 -1
- package/ngcc/src/host/ngcc_host.d.ts +1 -1
- package/ngcc/src/host/umd_host.d.ts +1 -1
- package/ngcc/src/host/utils.d.ts +1 -1
- package/ngcc/src/locking/lock_file.d.ts +1 -1
- package/ngcc/src/locking/lock_file_with_child_process/index.d.ts +2 -0
- package/ngcc/src/locking/lock_file_with_child_process/{unlocker.d.ts → ngcc_lock_unlocker.d.ts} +1 -1
- package/ngcc/src/migrations/migration.d.ts +1 -1
- package/ngcc/src/migrations/missing_injectable_migration.d.ts +1 -1
- package/ngcc/src/migrations/undecorated_child_migration.d.ts +1 -1
- package/ngcc/src/migrations/undecorated_parent_migration.d.ts +1 -1
- package/ngcc/src/migrations/utils.d.ts +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/bundle_program.d.ts +1 -1
- package/ngcc/src/packages/entry_point_bundle.d.ts +1 -1
- package/ngcc/src/packages/ngcc_compiler_host.d.ts +1 -1
- package/ngcc/src/packages/source_file_cache.d.ts +1 -1
- package/ngcc/src/packages/transformer.d.ts +1 -1
- package/ngcc/src/rendering/commonjs_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/dts_renderer.d.ts +1 -1
- package/ngcc/src/rendering/esm5_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/esm_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/renderer.d.ts +1 -1
- package/ngcc/src/rendering/rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/source_maps.d.ts +3 -3
- package/ngcc/src/rendering/umd_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/utils.d.ts +1 -1
- package/ngcc/src/utils.d.ts +1 -1
- package/package.json +52 -13
- package/private/bazel.d.ts +13 -0
- package/private/localize.d.ts +15 -0
- package/private/migrations.d.ts +16 -0
- package/{src → private}/tooling.d.ts +2 -2
- package/src/bin/ng_xi18n.d.ts +10 -0
- package/{ngcc/main-ivy-ngcc.d.ts → src/bin/ngc.d.ts} +2 -1
- package/src/diagnostics/translate_diagnostics.d.ts +1 -1
- package/src/extract_i18n.d.ts +0 -5
- package/src/main.d.ts +9 -6
- package/src/metadata/bundle_index_host.d.ts +1 -1
- package/src/metadata/bundler.d.ts +1 -1
- package/src/metadata/collector.d.ts +1 -1
- package/src/metadata/evaluator.d.ts +1 -1
- package/src/metadata/symbols.d.ts +1 -1
- package/src/ngtsc/annotations/src/component.d.ts +1 -1
- package/src/ngtsc/annotations/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/annotations/src/directive.d.ts +1 -1
- package/src/ngtsc/annotations/src/ng_module.d.ts +2 -3
- package/src/ngtsc/annotations/src/pipe.d.ts +1 -1
- package/src/ngtsc/annotations/src/util.d.ts +2 -4
- package/src/ngtsc/core/api/src/adapter.d.ts +1 -1
- package/src/ngtsc/core/api/src/interfaces.d.ts +1 -1
- package/src/ngtsc/core/api/src/options.d.ts +1 -1
- package/src/ngtsc/core/api/src/public_options.d.ts +5 -1
- package/src/ngtsc/core/src/compiler.d.ts +1 -1
- package/src/ngtsc/core/src/host.d.ts +1 -1
- package/src/ngtsc/cycles/src/analyzer.d.ts +1 -1
- package/src/ngtsc/cycles/src/imports.d.ts +1 -1
- package/src/ngtsc/diagnostics/index.d.ts +4 -2
- package/src/ngtsc/diagnostics/src/docs.d.ts +14 -0
- package/src/ngtsc/diagnostics/src/error.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +16 -0
- package/src/ngtsc/diagnostics/src/util.d.ts +2 -0
- package/src/ngtsc/entry_point/src/generator.d.ts +1 -1
- package/src/ngtsc/entry_point/src/private_export_checker.d.ts +1 -1
- package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -1
- package/src/ngtsc/file_system/src/logical.d.ts +1 -1
- package/src/ngtsc/file_system/src/util.d.ts +1 -1
- package/src/ngtsc/imports/src/alias.d.ts +1 -1
- package/src/ngtsc/imports/src/default.d.ts +1 -1
- package/src/ngtsc/imports/src/emitter.d.ts +1 -1
- package/src/ngtsc/imports/src/find_export.d.ts +1 -1
- package/src/ngtsc/imports/src/references.d.ts +1 -1
- package/src/ngtsc/imports/src/resolver.d.ts +1 -1
- package/src/ngtsc/incremental/api.d.ts +1 -1
- package/src/ngtsc/incremental/src/dependency_tracking.d.ts +1 -1
- package/src/ngtsc/incremental/src/incremental.d.ts +1 -1
- package/src/ngtsc/incremental/src/state.d.ts +1 -1
- package/src/ngtsc/incremental/src/strategy.d.ts +1 -1
- package/src/ngtsc/metadata/src/api.d.ts +1 -1
- package/src/ngtsc/metadata/src/dts.d.ts +1 -1
- package/src/ngtsc/metadata/src/resource_registry.d.ts +1 -1
- package/src/ngtsc/metadata/src/util.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/index.d.ts +1 -0
- package/src/ngtsc/partial_evaluator/src/builtin.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/dynamic.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/interface.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/interpreter.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/result.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/ts_helpers.d.ts +1 -1
- package/src/ngtsc/program.d.ts +1 -1
- package/src/ngtsc/program_driver/src/api.d.ts +1 -1
- package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
- package/src/ngtsc/reflection/src/host.d.ts +1 -1
- package/src/ngtsc/reflection/src/type_to_value.d.ts +1 -1
- package/src/ngtsc/reflection/src/typescript.d.ts +1 -1
- package/src/ngtsc/reflection/src/util.d.ts +1 -1
- package/src/ngtsc/resource/src/loader.d.ts +1 -1
- package/src/ngtsc/scope/src/local.d.ts +1 -1
- package/src/ngtsc/scope/src/typecheck.d.ts +1 -1
- package/src/ngtsc/shims/api.d.ts +1 -1
- package/src/ngtsc/shims/src/adapter.d.ts +1 -1
- package/src/ngtsc/shims/src/expando.d.ts +1 -1
- package/src/ngtsc/shims/src/factory_generator.d.ts +1 -1
- package/src/ngtsc/shims/src/reference_tagger.d.ts +1 -1
- package/src/ngtsc/shims/src/summary_generator.d.ts +1 -1
- package/src/ngtsc/switch/src/switch.d.ts +1 -1
- package/src/ngtsc/transform/src/alias.d.ts +1 -1
- package/src/ngtsc/transform/src/api.d.ts +1 -1
- package/src/ngtsc/transform/src/compilation.d.ts +1 -1
- package/src/ngtsc/transform/src/declaration.d.ts +1 -1
- package/src/ngtsc/transform/src/trait.d.ts +1 -1
- package/src/ngtsc/transform/src/transform.d.ts +1 -1
- package/src/ngtsc/transform/src/utils.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager.d.ts +1 -1
- package/src/ngtsc/translator/src/type_translator.d.ts +1 -1
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +1 -1
- package/src/ngtsc/translator/src/typescript_translator.d.ts +1 -1
- package/src/ngtsc/tsc_plugin.d.ts +1 -1
- package/src/ngtsc/typecheck/api/api.d.ts +1 -1
- package/src/ngtsc/typecheck/api/checker.d.ts +3 -4
- package/src/ngtsc/typecheck/api/context.d.ts +1 -1
- package/src/ngtsc/typecheck/api/scope.d.ts +1 -1
- package/src/ngtsc/typecheck/api/symbols.d.ts +1 -1
- package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/api/api.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/api/extended_template_checker.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +1 -1
- package/src/ngtsc/typecheck/src/checker.d.ts +3 -4
- package/src/ngtsc/typecheck/src/comments.d.ts +1 -1
- package/src/ngtsc/typecheck/src/completion.d.ts +3 -5
- package/src/ngtsc/typecheck/src/context.d.ts +1 -1
- package/src/ngtsc/typecheck/src/diagnostics.d.ts +1 -1
- package/src/ngtsc/typecheck/src/environment.d.ts +1 -1
- package/src/ngtsc/typecheck/src/expression.d.ts +1 -1
- package/src/ngtsc/typecheck/src/oob.d.ts +3 -4
- package/src/ngtsc/typecheck/src/shim.d.ts +1 -1
- package/src/ngtsc/typecheck/src/source.d.ts +1 -1
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
- package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +1 -1
- package/src/ngtsc/typecheck/src/ts_util.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_check_file.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_constructor.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_emitter.d.ts +1 -1
- package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +1 -1
- package/src/ngtsc/util/src/typescript.d.ts +1 -1
- package/src/ngtsc/util/src/visitor.d.ts +1 -1
- package/src/perform_compile.d.ts +1 -2
- package/src/perform_watch.d.ts +1 -1
- package/src/transformers/api.d.ts +1 -1
- package/src/transformers/compiler_host.d.ts +1 -1
- package/src/transformers/{downlevel_decorators_transform.d.ts → downlevel_decorators_transform/downlevel_decorators_transform.d.ts} +3 -3
- package/src/transformers/downlevel_decorators_transform/index.d.ts +9 -0
- package/src/transformers/{patch_alias_reference_resolution.d.ts → downlevel_decorators_transform/patch_alias_reference_resolution.d.ts} +2 -2
- package/src/transformers/i18n.d.ts +1 -1
- package/src/transformers/inline_resources.d.ts +1 -1
- package/src/transformers/lower_expressions.d.ts +1 -1
- package/src/transformers/metadata_cache.d.ts +1 -1
- package/src/transformers/node_emitter.d.ts +1 -1
- package/src/transformers/node_emitter_transform.d.ts +1 -1
- package/src/transformers/program.d.ts +1 -1
- package/src/transformers/r3_metadata_transform.d.ts +1 -1
- package/src/transformers/r3_transform.d.ts +1 -1
- package/src/transformers/util.d.ts +1 -1
- package/index.js +0 -40
- package/linker/babel/index.js +0 -25
- package/linker/babel/src/ast/babel_ast_factory.js +0 -153
- package/linker/babel/src/ast/babel_ast_host.js +0 -181
- package/linker/babel/src/babel_declaration_scope.js +0 -67
- package/linker/babel/src/babel_plugin.js +0 -38
- package/linker/babel/src/es2015_linker_plugin.js +0 -183
- package/linker/babel/src/linker_plugin_options.js +0 -13
- package/linker/index.js +0 -27
- package/linker/src/ast/ast_host.js +0 -20
- package/linker/src/ast/ast_value.js +0 -299
- package/linker/src/ast/typescript/typescript_ast_host.js +0 -183
- package/linker/src/ast/utils.js +0 -31
- package/linker/src/fatal_linker_error.js +0 -49
- package/linker/src/file_linker/declaration_scope.js +0 -20
- package/linker/src/file_linker/emit_scopes/emit_scope.js +0 -57
- package/linker/src/file_linker/emit_scopes/iife_emit_scope.js +0 -51
- package/linker/src/file_linker/file_linker.js +0 -97
- package/linker/src/file_linker/get_source_file.js +0 -42
- package/linker/src/file_linker/linker_environment.js +0 -38
- package/linker/src/file_linker/linker_options.js +0 -29
- package/linker/src/file_linker/needs_linking.js +0 -41
- package/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1.js +0 -47
- package/linker/src/file_linker/partial_linkers/partial_component_linker_1.js +0 -210
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.js +0 -154
- package/linker/src/file_linker/partial_linkers/partial_factory_linker_1.js +0 -70
- package/linker/src/file_linker/partial_linkers/partial_injectable_linker_1.js +0 -74
- package/linker/src/file_linker/partial_linkers/partial_injector_linker_1.js +0 -56
- package/linker/src/file_linker/partial_linkers/partial_linker.js +0 -13
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.js +0 -194
- package/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.js +0 -126
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.js +0 -59
- package/linker/src/file_linker/partial_linkers/util.js +0 -95
- package/linker/src/file_linker/translator.js +0 -40
- package/linker/src/linker_import_generator.js +0 -43
- package/ngcc/index.js +0 -33
- package/ngcc/main-ivy-ngcc.js +0 -12
- package/ngcc/main-ngcc.js +0 -54
- package/ngcc/src/analysis/decoration_analyzer.js +0 -268
- package/ngcc/src/analysis/migration_host.js +0 -108
- package/ngcc/src/analysis/module_with_providers_analyzer.js +0 -197
- package/ngcc/src/analysis/ngcc_references_registry.js +0 -65
- package/ngcc/src/analysis/ngcc_trait_compiler.js +0 -117
- package/ngcc/src/analysis/private_declarations_analyzer.js +0 -63
- package/ngcc/src/analysis/switch_marker_analyzer.js +0 -50
- package/ngcc/src/analysis/types.js +0 -15
- package/ngcc/src/analysis/util.js +0 -36
- package/ngcc/src/command_line_options.js +0 -156
- package/ngcc/src/constants.js +0 -23
- package/ngcc/src/dependencies/commonjs_dependency_host.js +0 -129
- package/ngcc/src/dependencies/dependency_host.js +0 -143
- package/ngcc/src/dependencies/dependency_resolver.js +0 -180
- package/ngcc/src/dependencies/dts_dependency_host.js +0 -35
- package/ngcc/src/dependencies/esm_dependency_host.js +0 -307
- package/ngcc/src/dependencies/module_resolver.js +0 -269
- package/ngcc/src/dependencies/umd_dependency_host.js +0 -53
- package/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.js +0 -70
- package/ngcc/src/entry_point_finder/entry_point_collector.js +0 -157
- package/ngcc/src/entry_point_finder/interface.js +0 -13
- package/ngcc/src/entry_point_finder/program_based_entry_point_finder.js +0 -132
- package/ngcc/src/entry_point_finder/targeted_entry_point_finder.js +0 -268
- package/ngcc/src/entry_point_finder/tracing_entry_point_finder.js +0 -78
- package/ngcc/src/entry_point_finder/utils.js +0 -234
- package/ngcc/src/execution/analyze_entry_points.js +0 -197
- package/ngcc/src/execution/api.js +0 -13
- package/ngcc/src/execution/cluster/api.js +0 -20
- package/ngcc/src/execution/cluster/executor.js +0 -52
- package/ngcc/src/execution/cluster/master.js +0 -311
- package/ngcc/src/execution/cluster/package_json_updater.js +0 -79
- package/ngcc/src/execution/cluster/utils.js +0 -77
- package/ngcc/src/execution/cluster/worker.js +0 -123
- package/ngcc/src/execution/create_compile_function.js +0 -76
- package/ngcc/src/execution/single_process_executor.js +0 -91
- package/ngcc/src/execution/tasks/api.js +0 -35
- package/ngcc/src/execution/tasks/completion.js +0 -79
- package/ngcc/src/execution/tasks/queues/base_task_queue.js +0 -120
- package/ngcc/src/execution/tasks/queues/parallel_task_queue.js +0 -87
- package/ngcc/src/execution/tasks/queues/serial_task_queue.js +0 -49
- package/ngcc/src/execution/tasks/utils.js +0 -167
- package/ngcc/src/host/commonjs_host.js +0 -261
- package/ngcc/src/host/commonjs_umd_utils.js +0 -210
- package/ngcc/src/host/delegating_host.js +0 -156
- package/ngcc/src/host/esm2015_host.js +0 -2441
- package/ngcc/src/host/esm5_host.js +0 -745
- package/ngcc/src/host/ngcc_host.js +0 -29
- package/ngcc/src/host/umd_host.js +0 -539
- package/ngcc/src/host/utils.js +0 -26
- package/ngcc/src/locking/async_locker.js +0 -121
- package/ngcc/src/locking/lock_file.js +0 -18
- package/ngcc/src/locking/lock_file_with_child_process/index.js +0 -93
- package/ngcc/src/locking/lock_file_with_child_process/unlocker.js +0 -46
- package/ngcc/src/locking/lock_file_with_child_process/util.js +0 -43
- package/ngcc/src/locking/sync_locker.js +0 -67
- package/ngcc/src/main.js +0 -163
- package/ngcc/src/migrations/migration.js +0 -13
- package/ngcc/src/migrations/missing_injectable_migration.js +0 -227
- package/ngcc/src/migrations/undecorated_child_migration.js +0 -90
- package/ngcc/src/migrations/undecorated_parent_migration.js +0 -103
- package/ngcc/src/migrations/utils.js +0 -137
- package/ngcc/src/ngcc_options.js +0 -135
- package/ngcc/src/packages/build_marker.js +0 -124
- package/ngcc/src/packages/bundle_program.js +0 -80
- package/ngcc/src/packages/configuration.js +0 -334
- package/ngcc/src/packages/entry_point.js +0 -267
- package/ngcc/src/packages/entry_point_bundle.js +0 -96
- package/ngcc/src/packages/entry_point_manifest.js +0 -207
- package/ngcc/src/packages/ngcc_compiler_host.js +0 -101
- package/ngcc/src/packages/patch_ts_expando_initializer.js +0 -174
- package/ngcc/src/packages/source_file_cache.js +0 -207
- package/ngcc/src/packages/transformer.js +0 -157
- package/ngcc/src/path_mappings.js +0 -27
- package/ngcc/src/rendering/commonjs_rendering_formatter.js +0 -106
- package/ngcc/src/rendering/dts_renderer.js +0 -170
- package/ngcc/src/rendering/esm5_rendering_formatter.js +0 -70
- package/ngcc/src/rendering/esm_rendering_formatter.js +0 -291
- package/ngcc/src/rendering/ngcc_import_rewriter.js +0 -49
- package/ngcc/src/rendering/renderer.js +0 -204
- package/ngcc/src/rendering/rendering_formatter.js +0 -15
- package/ngcc/src/rendering/source_maps.js +0 -68
- package/ngcc/src/rendering/umd_rendering_formatter.js +0 -326
- package/ngcc/src/rendering/utils.js +0 -35
- package/ngcc/src/utils.js +0 -182
- package/ngcc/src/writing/cleaning/cleaning_strategies.js +0 -80
- package/ngcc/src/writing/cleaning/package_cleaner.js +0 -126
- package/ngcc/src/writing/cleaning/utils.js +0 -30
- package/ngcc/src/writing/file_writer.js +0 -13
- package/ngcc/src/writing/in_place_file_writer.js +0 -90
- package/ngcc/src/writing/new_entry_point_file_writer.js +0 -214
- package/ngcc/src/writing/package_json_updater.js +0 -182
- package/src/diagnostics/translate_diagnostics.js +0 -61
- package/src/diagnostics/typescript_version.js +0 -96
- package/src/extract_i18n.js +0 -62
- package/src/language_services.js +0 -34
- package/src/main.js +0 -210
- package/src/metadata/bundle_index_host.js +0 -133
- package/src/metadata/bundler.js +0 -624
- package/src/metadata/collector.js +0 -799
- package/src/metadata/evaluator.js +0 -677
- package/src/metadata/index.js +0 -24
- package/src/metadata/index_writer.js +0 -80
- package/src/metadata/schema.js +0 -136
- package/src/metadata/symbols.js +0 -149
- package/src/ngtsc/annotations/index.js +0 -35
- package/src/ngtsc/annotations/src/api.js +0 -20
- package/src/ngtsc/annotations/src/component.js +0 -1338
- package/src/ngtsc/annotations/src/diagnostics.js +0 -174
- package/src/ngtsc/annotations/src/directive.js +0 -724
- package/src/ngtsc/annotations/src/factory.js +0 -32
- package/src/ngtsc/annotations/src/injectable.js +0 -284
- package/src/ngtsc/annotations/src/metadata.js +0 -160
- package/src/ngtsc/annotations/src/ng_module.js +0 -671
- package/src/ngtsc/annotations/src/pipe.js +0 -171
- package/src/ngtsc/annotations/src/references_registry.js +0 -38
- package/src/ngtsc/annotations/src/util.js +0 -566
- package/src/ngtsc/core/api/index.js +0 -25
- package/src/ngtsc/core/api/src/adapter.js +0 -20
- package/src/ngtsc/core/api/src/interfaces.js +0 -20
- package/src/ngtsc/core/api/src/options.js +0 -20
- package/src/ngtsc/core/api/src/public_options.js +0 -20
- package/src/ngtsc/core/index.js +0 -25
- package/src/ngtsc/core/src/compiler.js +0 -1105
- package/src/ngtsc/core/src/host.js +0 -273
- package/src/ngtsc/cycles/index.js +0 -26
- package/src/ngtsc/cycles/src/analyzer.js +0 -163
- package/src/ngtsc/cycles/src/imports.js +0 -175
- package/src/ngtsc/diagnostics/index.js +0 -33
- package/src/ngtsc/diagnostics/src/error.js +0 -69
- package/src/ngtsc/diagnostics/src/error_code.js +0 -235
- package/src/ngtsc/diagnostics/src/util.js +0 -35
- package/src/ngtsc/entry_point/index.js +0 -29
- package/src/ngtsc/entry_point/src/generator.js +0 -45
- package/src/ngtsc/entry_point/src/logic.js +0 -61
- package/src/ngtsc/entry_point/src/private_export_checker.js +0 -137
- package/src/ngtsc/entry_point/src/reference_graph.js +0 -91
- package/src/ngtsc/file_system/index.js +0 -45
- package/src/ngtsc/file_system/src/compiler_host.js +0 -80
- package/src/ngtsc/file_system/src/helpers.js +0 -135
- package/src/ngtsc/file_system/src/invalid_file_system.js +0 -120
- package/src/ngtsc/file_system/src/logical.js +0 -100
- package/src/ngtsc/file_system/src/node_js_file_system.js +0 -179
- package/src/ngtsc/file_system/src/types.js +0 -20
- package/src/ngtsc/file_system/src/util.js +0 -38
- package/src/ngtsc/file_system/testing/index.d.ts +0 -13
- package/src/ngtsc/file_system/testing/index.js +0 -32
- package/src/ngtsc/file_system/testing/src/mock_file_system.d.ts +0 -72
- package/src/ngtsc/file_system/testing/src/mock_file_system.js +0 -333
- package/src/ngtsc/file_system/testing/src/mock_file_system_native.d.ts +0 -16
- package/src/ngtsc/file_system/testing/src/mock_file_system_native.js +0 -85
- package/src/ngtsc/file_system/testing/src/mock_file_system_posix.d.ts +0 -13
- package/src/ngtsc/file_system/testing/src/mock_file_system_posix.js +0 -68
- package/src/ngtsc/file_system/testing/src/mock_file_system_windows.d.ts +0 -13
- package/src/ngtsc/file_system/testing/src/mock_file_system_windows.js +0 -68
- package/src/ngtsc/file_system/testing/src/test_helper.d.ts +0 -17
- package/src/ngtsc/file_system/testing/src/test_helper.js +0 -143
- package/src/ngtsc/imports/index.js +0 -43
- package/src/ngtsc/imports/src/alias.js +0 -158
- package/src/ngtsc/imports/src/core.js +0 -98
- package/src/ngtsc/imports/src/default.js +0 -153
- package/src/ngtsc/imports/src/emitter.js +0 -317
- package/src/ngtsc/imports/src/find_export.js +0 -82
- package/src/ngtsc/imports/src/reexport.js +0 -20
- package/src/ngtsc/imports/src/references.js +0 -171
- package/src/ngtsc/imports/src/resolver.js +0 -39
- package/src/ngtsc/incremental/api.js +0 -20
- package/src/ngtsc/incremental/index.js +0 -29
- package/src/ngtsc/incremental/semantic_graph/index.js +0 -34
- package/src/ngtsc/incremental/semantic_graph/src/api.js +0 -51
- package/src/ngtsc/incremental/semantic_graph/src/graph.js +0 -302
- package/src/ngtsc/incremental/semantic_graph/src/type_parameters.js +0 -55
- package/src/ngtsc/incremental/semantic_graph/src/util.js +0 -111
- package/src/ngtsc/incremental/src/dependency_tracking.js +0 -165
- package/src/ngtsc/incremental/src/incremental.js +0 -393
- package/src/ngtsc/incremental/src/noop.js +0 -26
- package/src/ngtsc/incremental/src/state.js +0 -30
- package/src/ngtsc/incremental/src/strategy.js +0 -99
- package/src/ngtsc/indexer/index.js +0 -27
- package/src/ngtsc/indexer/src/api.js +0 -45
- package/src/ngtsc/indexer/src/context.js +0 -40
- package/src/ngtsc/indexer/src/template.js +0 -324
- package/src/ngtsc/indexer/src/transform.js +0 -66
- package/src/ngtsc/logging/index.js +0 -25
- package/src/ngtsc/logging/src/console_logger.js +0 -75
- package/src/ngtsc/logging/src/logger.js +0 -28
- package/src/ngtsc/logging/testing/index.js +0 -23
- package/src/ngtsc/logging/testing/src/mock_logger.d.ts +0 -20
- package/src/ngtsc/logging/testing/src/mock_logger.js +0 -64
- package/src/ngtsc/metadata/index.js +0 -39
- package/src/ngtsc/metadata/src/api.js +0 -26
- package/src/ngtsc/metadata/src/dts.js +0 -168
- package/src/ngtsc/metadata/src/inheritance.js +0 -122
- package/src/ngtsc/metadata/src/property_mapping.js +0 -244
- package/src/ngtsc/metadata/src/registry.js +0 -133
- package/src/ngtsc/metadata/src/resource_registry.js +0 -109
- package/src/ngtsc/metadata/src/util.js +0 -275
- package/src/ngtsc/partial_evaluator/index.js +0 -31
- package/src/ngtsc/partial_evaluator/src/builtin.js +0 -125
- package/src/ngtsc/partial_evaluator/src/diagnostics.js +0 -193
- package/src/ngtsc/partial_evaluator/src/dynamic.js +0 -109
- package/src/ngtsc/partial_evaluator/src/interface.js +0 -42
- package/src/ngtsc/partial_evaluator/src/interpreter.js +0 -780
- package/src/ngtsc/partial_evaluator/src/known_declaration.js +0 -57
- package/src/ngtsc/partial_evaluator/src/result.js +0 -72
- package/src/ngtsc/partial_evaluator/src/ts_helpers.js +0 -121
- package/src/ngtsc/perf/index.js +0 -28
- package/src/ngtsc/perf/src/api.js +0 -291
- package/src/ngtsc/perf/src/clock.js +0 -31
- package/src/ngtsc/perf/src/noop.js +0 -37
- package/src/ngtsc/perf/src/recorder.js +0 -143
- package/src/ngtsc/program.js +0 -360
- package/src/ngtsc/program_driver/index.js +0 -25
- package/src/ngtsc/program_driver/src/api.js +0 -36
- package/src/ngtsc/program_driver/src/ts_create_program_driver.js +0 -200
- package/src/ngtsc/reflection/index.js +0 -36
- package/src/ngtsc/reflection/src/host.js +0 -88
- package/src/ngtsc/reflection/src/type_to_value.js +0 -259
- package/src/ngtsc/reflection/src/typescript.js +0 -640
- package/src/ngtsc/reflection/src/util.js +0 -37
- package/src/ngtsc/resource/index.js +0 -23
- package/src/ngtsc/resource/src/loader.js +0 -285
- package/src/ngtsc/scope/index.js +0 -29
- package/src/ngtsc/scope/src/api.js +0 -20
- package/src/ngtsc/scope/src/component_scope.js +0 -69
- package/src/ngtsc/scope/src/dependency.js +0 -201
- package/src/ngtsc/scope/src/local.js +0 -665
- package/src/ngtsc/scope/src/typecheck.js +0 -120
- package/src/ngtsc/shims/api.js +0 -13
- package/src/ngtsc/shims/index.js +0 -39
- package/src/ngtsc/shims/src/adapter.js +0 -266
- package/src/ngtsc/shims/src/expando.js +0 -147
- package/src/ngtsc/shims/src/factory_generator.js +0 -292
- package/src/ngtsc/shims/src/reference_tagger.js +0 -94
- package/src/ngtsc/shims/src/summary_generator.js +0 -101
- package/src/ngtsc/shims/src/util.js +0 -41
- package/src/ngtsc/sourcemaps/index.js +0 -27
- package/src/ngtsc/sourcemaps/src/content_origin.js +0 -48
- package/src/ngtsc/sourcemaps/src/raw_source_map.js +0 -13
- package/src/ngtsc/sourcemaps/src/segment_marker.js +0 -55
- package/src/ngtsc/sourcemaps/src/source_file.js +0 -519
- package/src/ngtsc/sourcemaps/src/source_file_loader.js +0 -234
- package/src/ngtsc/switch/index.js +0 -23
- package/src/ngtsc/switch/src/switch.js +0 -141
- package/src/ngtsc/transform/index.js +0 -36
- package/src/ngtsc/transform/src/alias.js +0 -46
- package/src/ngtsc/transform/src/api.js +0 -76
- package/src/ngtsc/transform/src/compilation.js +0 -862
- package/src/ngtsc/transform/src/declaration.js +0 -234
- package/src/ngtsc/transform/src/trait.js +0 -111
- package/src/ngtsc/transform/src/transform.js +0 -333
- package/src/ngtsc/transform/src/utils.js +0 -73
- package/src/ngtsc/translator/index.js +0 -37
- package/src/ngtsc/translator/src/api/ast_factory.js +0 -20
- package/src/ngtsc/translator/src/api/import_generator.js +0 -20
- package/src/ngtsc/translator/src/context.js +0 -47
- package/src/ngtsc/translator/src/import_manager.js +0 -77
- package/src/ngtsc/translator/src/translator.js +0 -347
- package/src/ngtsc/translator/src/type_translator.js +0 -220
- package/src/ngtsc/translator/src/typescript_ast_factory.js +0 -251
- package/src/ngtsc/translator/src/typescript_translator.js +0 -34
- package/src/ngtsc/tsc_plugin.js +0 -129
- package/src/ngtsc/typecheck/api/api.js +0 -20
- package/src/ngtsc/typecheck/api/checker.js +0 -44
- package/src/ngtsc/typecheck/api/completion.js +0 -29
- package/src/ngtsc/typecheck/api/context.js +0 -20
- package/src/ngtsc/typecheck/api/index.js +0 -27
- package/src/ngtsc/typecheck/api/scope.js +0 -20
- package/src/ngtsc/typecheck/api/symbols.js +0 -35
- package/src/ngtsc/typecheck/diagnostics/index.js +0 -23
- package/src/ngtsc/typecheck/diagnostics/src/diagnostic.js +0 -141
- package/src/ngtsc/typecheck/diagnostics/src/id.js +0 -37
- package/src/ngtsc/typecheck/extended/api/api.js +0 -124
- package/src/ngtsc/typecheck/extended/api/extended_template_checker.js +0 -20
- package/src/ngtsc/typecheck/extended/api/index.js +0 -23
- package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.js +0 -52
- package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.js +0 -64
- package/src/ngtsc/typecheck/extended/index.js +0 -23
- package/src/ngtsc/typecheck/extended/src/extended_template_checker.js +0 -55
- package/src/ngtsc/typecheck/index.js +0 -29
- package/src/ngtsc/typecheck/src/checker.js +0 -767
- package/src/ngtsc/typecheck/src/comments.js +0 -181
- package/src/ngtsc/typecheck/src/completion.js +0 -230
- package/src/ngtsc/typecheck/src/context.js +0 -424
- package/src/ngtsc/typecheck/src/diagnostics.js +0 -114
- package/src/ngtsc/typecheck/src/dom.js +0 -87
- package/src/ngtsc/typecheck/src/environment.js +0 -160
- package/src/ngtsc/typecheck/src/expression.js +0 -417
- package/src/ngtsc/typecheck/src/line_mappings.js +0 -77
- package/src/ngtsc/typecheck/src/oob.js +0 -181
- package/src/ngtsc/typecheck/src/shim.js +0 -52
- package/src/ngtsc/typecheck/src/source.js +0 -91
- package/src/ngtsc/typecheck/src/tcb_util.js +0 -165
- package/src/ngtsc/typecheck/src/template_semantics.js +0 -52
- package/src/ngtsc/typecheck/src/template_symbol_builder.js +0 -551
- package/src/ngtsc/typecheck/src/ts_util.js +0 -202
- package/src/ngtsc/typecheck/src/type_check_block.js +0 -2212
- package/src/ngtsc/typecheck/src/type_check_file.js +0 -115
- package/src/ngtsc/typecheck/src/type_constructor.js +0 -255
- package/src/ngtsc/typecheck/src/type_emitter.js +0 -164
- package/src/ngtsc/typecheck/src/type_parameter_emitter.js +0 -115
- package/src/ngtsc/util/src/path.js +0 -33
- package/src/ngtsc/util/src/typescript.js +0 -176
- package/src/ngtsc/util/src/visitor.js +0 -119
- package/src/ngtsc/xi18n/index.js +0 -22
- package/src/ngtsc/xi18n/src/context.js +0 -20
- package/src/perform_compile.js +0 -322
- package/src/perform_watch.js +0 -263
- package/src/tooling.js +0 -47
- package/src/transformers/api.js +0 -42
- package/src/transformers/compiler_host.js +0 -623
- package/src/transformers/downlevel_decorators_transform.js +0 -611
- package/src/transformers/entry_points.js +0 -25
- package/src/transformers/i18n.js +0 -76
- package/src/transformers/inline_resources.js +0 -287
- package/src/transformers/lower_expressions.js +0 -365
- package/src/transformers/metadata_cache.js +0 -96
- package/src/transformers/metadata_reader.js +0 -120
- package/src/transformers/node_emitter.js +0 -637
- package/src/transformers/node_emitter_transform.js +0 -88
- package/src/transformers/patch_alias_reference_resolution.js +0 -129
- package/src/transformers/program.js +0 -998
- package/src/transformers/r3_metadata_transform.js +0 -73
- package/src/transformers/r3_transform.js +0 -44
- package/src/transformers/util.js +0 -122
- package/src/typescript_support.js +0 -74
- package/src/version.js +0 -28
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
|
|
2
|
+
import {createRequire as __cjsCompatRequire} from 'module';
|
|
3
|
+
const require = __cjsCompatRequire(import.meta.url);
|
|
4
|
+
const __ESM_IMPORT_META_URL__ = import.meta.url;
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
23
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
24
|
+
}) : x)(function(x) {
|
|
25
|
+
if (typeof require !== "undefined")
|
|
26
|
+
return require.apply(this, arguments);
|
|
27
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/logger.mjs
|
|
31
|
+
var LogLevel;
|
|
32
|
+
(function(LogLevel2) {
|
|
33
|
+
LogLevel2[LogLevel2["debug"] = 0] = "debug";
|
|
34
|
+
LogLevel2[LogLevel2["info"] = 1] = "info";
|
|
35
|
+
LogLevel2[LogLevel2["warn"] = 2] = "warn";
|
|
36
|
+
LogLevel2[LogLevel2["error"] = 3] = "error";
|
|
37
|
+
})(LogLevel || (LogLevel = {}));
|
|
38
|
+
|
|
39
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/console_logger.mjs
|
|
40
|
+
var RESET = "[0m";
|
|
41
|
+
var RED = "[31m";
|
|
42
|
+
var YELLOW = "[33m";
|
|
43
|
+
var BLUE = "[36m";
|
|
44
|
+
var DEBUG = `${BLUE}Debug:${RESET}`;
|
|
45
|
+
var WARN = `${YELLOW}Warning:${RESET}`;
|
|
46
|
+
var ERROR = `${RED}Error:${RESET}`;
|
|
47
|
+
var ConsoleLogger = class {
|
|
48
|
+
constructor(level) {
|
|
49
|
+
this.level = level;
|
|
50
|
+
}
|
|
51
|
+
debug(...args) {
|
|
52
|
+
if (this.level <= LogLevel.debug)
|
|
53
|
+
console.debug(DEBUG, ...args);
|
|
54
|
+
}
|
|
55
|
+
info(...args) {
|
|
56
|
+
if (this.level <= LogLevel.info)
|
|
57
|
+
console.info(...args);
|
|
58
|
+
}
|
|
59
|
+
warn(...args) {
|
|
60
|
+
if (this.level <= LogLevel.warn)
|
|
61
|
+
console.warn(WARN, ...args);
|
|
62
|
+
}
|
|
63
|
+
error(...args) {
|
|
64
|
+
if (this.level <= LogLevel.error)
|
|
65
|
+
console.error(ERROR, ...args);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/compiler_host.mjs
|
|
70
|
+
import {
|
|
71
|
+
EOL
|
|
72
|
+
} from "os";
|
|
73
|
+
import ts from "typescript";
|
|
74
|
+
|
|
75
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/invalid_file_system.mjs
|
|
76
|
+
var InvalidFileSystem = class {
|
|
77
|
+
exists(path) {
|
|
78
|
+
throw makeError();
|
|
79
|
+
}
|
|
80
|
+
readFile(path) {
|
|
81
|
+
throw makeError();
|
|
82
|
+
}
|
|
83
|
+
readFileBuffer(path) {
|
|
84
|
+
throw makeError();
|
|
85
|
+
}
|
|
86
|
+
writeFile(path, data, exclusive) {
|
|
87
|
+
throw makeError();
|
|
88
|
+
}
|
|
89
|
+
removeFile(path) {
|
|
90
|
+
throw makeError();
|
|
91
|
+
}
|
|
92
|
+
symlink(target, path) {
|
|
93
|
+
throw makeError();
|
|
94
|
+
}
|
|
95
|
+
readdir(path) {
|
|
96
|
+
throw makeError();
|
|
97
|
+
}
|
|
98
|
+
lstat(path) {
|
|
99
|
+
throw makeError();
|
|
100
|
+
}
|
|
101
|
+
stat(path) {
|
|
102
|
+
throw makeError();
|
|
103
|
+
}
|
|
104
|
+
pwd() {
|
|
105
|
+
throw makeError();
|
|
106
|
+
}
|
|
107
|
+
chdir(path) {
|
|
108
|
+
throw makeError();
|
|
109
|
+
}
|
|
110
|
+
extname(path) {
|
|
111
|
+
throw makeError();
|
|
112
|
+
}
|
|
113
|
+
copyFile(from, to) {
|
|
114
|
+
throw makeError();
|
|
115
|
+
}
|
|
116
|
+
moveFile(from, to) {
|
|
117
|
+
throw makeError();
|
|
118
|
+
}
|
|
119
|
+
ensureDir(path) {
|
|
120
|
+
throw makeError();
|
|
121
|
+
}
|
|
122
|
+
removeDeep(path) {
|
|
123
|
+
throw makeError();
|
|
124
|
+
}
|
|
125
|
+
isCaseSensitive() {
|
|
126
|
+
throw makeError();
|
|
127
|
+
}
|
|
128
|
+
resolve(...paths) {
|
|
129
|
+
throw makeError();
|
|
130
|
+
}
|
|
131
|
+
dirname(file) {
|
|
132
|
+
throw makeError();
|
|
133
|
+
}
|
|
134
|
+
join(basePath, ...paths) {
|
|
135
|
+
throw makeError();
|
|
136
|
+
}
|
|
137
|
+
isRoot(path) {
|
|
138
|
+
throw makeError();
|
|
139
|
+
}
|
|
140
|
+
isRooted(path) {
|
|
141
|
+
throw makeError();
|
|
142
|
+
}
|
|
143
|
+
relative(from, to) {
|
|
144
|
+
throw makeError();
|
|
145
|
+
}
|
|
146
|
+
basename(filePath, extension) {
|
|
147
|
+
throw makeError();
|
|
148
|
+
}
|
|
149
|
+
realpath(filePath) {
|
|
150
|
+
throw makeError();
|
|
151
|
+
}
|
|
152
|
+
getDefaultLibLocation() {
|
|
153
|
+
throw makeError();
|
|
154
|
+
}
|
|
155
|
+
normalize(path) {
|
|
156
|
+
throw makeError();
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
function makeError() {
|
|
160
|
+
return new Error("FileSystem has not been configured. Please call `setFileSystem()` before calling this method.");
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/util.mjs
|
|
164
|
+
var TS_DTS_JS_EXTENSION = /(?:\.d)?\.ts$|\.js$/;
|
|
165
|
+
function normalizeSeparators(path) {
|
|
166
|
+
return path.replace(/\\/g, "/");
|
|
167
|
+
}
|
|
168
|
+
function stripExtension(path) {
|
|
169
|
+
return path.replace(TS_DTS_JS_EXTENSION, "");
|
|
170
|
+
}
|
|
171
|
+
function getSourceFileOrError(program, fileName) {
|
|
172
|
+
const sf = program.getSourceFile(fileName);
|
|
173
|
+
if (sf === void 0) {
|
|
174
|
+
throw new Error(`Program does not contain "${fileName}" - available files are ${program.getSourceFiles().map((sf2) => sf2.fileName).join(", ")}`);
|
|
175
|
+
}
|
|
176
|
+
return sf;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/helpers.mjs
|
|
180
|
+
var fs = new InvalidFileSystem();
|
|
181
|
+
function getFileSystem() {
|
|
182
|
+
return fs;
|
|
183
|
+
}
|
|
184
|
+
function setFileSystem(fileSystem) {
|
|
185
|
+
fs = fileSystem;
|
|
186
|
+
}
|
|
187
|
+
function absoluteFrom(path) {
|
|
188
|
+
if (!fs.isRooted(path)) {
|
|
189
|
+
throw new Error(`Internal Error: absoluteFrom(${path}): path is not absolute`);
|
|
190
|
+
}
|
|
191
|
+
return fs.resolve(path);
|
|
192
|
+
}
|
|
193
|
+
var ABSOLUTE_PATH = Symbol("AbsolutePath");
|
|
194
|
+
function absoluteFromSourceFile(sf) {
|
|
195
|
+
const sfWithPatch = sf;
|
|
196
|
+
if (sfWithPatch[ABSOLUTE_PATH] === void 0) {
|
|
197
|
+
sfWithPatch[ABSOLUTE_PATH] = fs.resolve(sfWithPatch.fileName);
|
|
198
|
+
}
|
|
199
|
+
return sfWithPatch[ABSOLUTE_PATH];
|
|
200
|
+
}
|
|
201
|
+
function relativeFrom(path) {
|
|
202
|
+
const normalized = normalizeSeparators(path);
|
|
203
|
+
if (fs.isRooted(normalized)) {
|
|
204
|
+
throw new Error(`Internal Error: relativeFrom(${path}): path is not relative`);
|
|
205
|
+
}
|
|
206
|
+
return normalized;
|
|
207
|
+
}
|
|
208
|
+
function dirname(file) {
|
|
209
|
+
return fs.dirname(file);
|
|
210
|
+
}
|
|
211
|
+
function join(basePath, ...paths) {
|
|
212
|
+
return fs.join(basePath, ...paths);
|
|
213
|
+
}
|
|
214
|
+
function resolve(basePath, ...paths) {
|
|
215
|
+
return fs.resolve(basePath, ...paths);
|
|
216
|
+
}
|
|
217
|
+
function isRoot(path) {
|
|
218
|
+
return fs.isRoot(path);
|
|
219
|
+
}
|
|
220
|
+
function isRooted(path) {
|
|
221
|
+
return fs.isRooted(path);
|
|
222
|
+
}
|
|
223
|
+
function relative(from, to) {
|
|
224
|
+
return fs.relative(from, to);
|
|
225
|
+
}
|
|
226
|
+
function basename(filePath, extension) {
|
|
227
|
+
return fs.basename(filePath, extension);
|
|
228
|
+
}
|
|
229
|
+
function isLocalRelativePath(relativePath) {
|
|
230
|
+
return !isRooted(relativePath) && !relativePath.startsWith("..");
|
|
231
|
+
}
|
|
232
|
+
function toRelativeImport(relativePath) {
|
|
233
|
+
return isLocalRelativePath(relativePath) ? `./${relativePath}` : relativePath;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/compiler_host.mjs
|
|
237
|
+
var NgtscCompilerHost = class {
|
|
238
|
+
constructor(fs3, options = {}) {
|
|
239
|
+
this.fs = fs3;
|
|
240
|
+
this.options = options;
|
|
241
|
+
}
|
|
242
|
+
getSourceFile(fileName, languageVersion) {
|
|
243
|
+
const text = this.readFile(fileName);
|
|
244
|
+
return text !== void 0 ? ts.createSourceFile(fileName, text, languageVersion, true) : void 0;
|
|
245
|
+
}
|
|
246
|
+
getDefaultLibFileName(options) {
|
|
247
|
+
return this.fs.join(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options));
|
|
248
|
+
}
|
|
249
|
+
getDefaultLibLocation() {
|
|
250
|
+
return this.fs.getDefaultLibLocation();
|
|
251
|
+
}
|
|
252
|
+
writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles) {
|
|
253
|
+
const path = absoluteFrom(fileName);
|
|
254
|
+
this.fs.ensureDir(this.fs.dirname(path));
|
|
255
|
+
this.fs.writeFile(path, data);
|
|
256
|
+
}
|
|
257
|
+
getCurrentDirectory() {
|
|
258
|
+
return this.fs.pwd();
|
|
259
|
+
}
|
|
260
|
+
getCanonicalFileName(fileName) {
|
|
261
|
+
return this.useCaseSensitiveFileNames() ? fileName : fileName.toLowerCase();
|
|
262
|
+
}
|
|
263
|
+
useCaseSensitiveFileNames() {
|
|
264
|
+
return this.fs.isCaseSensitive();
|
|
265
|
+
}
|
|
266
|
+
getNewLine() {
|
|
267
|
+
switch (this.options.newLine) {
|
|
268
|
+
case ts.NewLineKind.CarriageReturnLineFeed:
|
|
269
|
+
return "\r\n";
|
|
270
|
+
case ts.NewLineKind.LineFeed:
|
|
271
|
+
return "\n";
|
|
272
|
+
default:
|
|
273
|
+
return EOL;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
fileExists(fileName) {
|
|
277
|
+
const absPath = this.fs.resolve(fileName);
|
|
278
|
+
return this.fs.exists(absPath) && this.fs.stat(absPath).isFile();
|
|
279
|
+
}
|
|
280
|
+
readFile(fileName) {
|
|
281
|
+
const absPath = this.fs.resolve(fileName);
|
|
282
|
+
if (!this.fileExists(absPath)) {
|
|
283
|
+
return void 0;
|
|
284
|
+
}
|
|
285
|
+
return this.fs.readFile(absPath);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/logical.mjs
|
|
290
|
+
var LogicalProjectPath = {
|
|
291
|
+
relativePathBetween: function(from, to) {
|
|
292
|
+
const relativePath = relative(dirname(resolve(from)), resolve(to));
|
|
293
|
+
return toRelativeImport(relativePath);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
var LogicalFileSystem = class {
|
|
297
|
+
constructor(rootDirs, compilerHost) {
|
|
298
|
+
this.compilerHost = compilerHost;
|
|
299
|
+
this.cache = new Map();
|
|
300
|
+
this.rootDirs = rootDirs.concat([]).sort((a, b) => b.length - a.length);
|
|
301
|
+
this.canonicalRootDirs = this.rootDirs.map((dir) => this.compilerHost.getCanonicalFileName(dir));
|
|
302
|
+
}
|
|
303
|
+
logicalPathOfSf(sf) {
|
|
304
|
+
return this.logicalPathOfFile(absoluteFrom(sf.fileName));
|
|
305
|
+
}
|
|
306
|
+
logicalPathOfFile(physicalFile) {
|
|
307
|
+
const canonicalFilePath = this.compilerHost.getCanonicalFileName(physicalFile);
|
|
308
|
+
if (!this.cache.has(canonicalFilePath)) {
|
|
309
|
+
let logicalFile = null;
|
|
310
|
+
for (let i = 0; i < this.rootDirs.length; i++) {
|
|
311
|
+
const rootDir = this.rootDirs[i];
|
|
312
|
+
const canonicalRootDir = this.canonicalRootDirs[i];
|
|
313
|
+
if (isWithinBasePath(canonicalRootDir, canonicalFilePath)) {
|
|
314
|
+
logicalFile = this.createLogicalProjectPath(physicalFile, rootDir);
|
|
315
|
+
if (logicalFile.indexOf("/node_modules/") !== -1) {
|
|
316
|
+
logicalFile = null;
|
|
317
|
+
} else {
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
this.cache.set(canonicalFilePath, logicalFile);
|
|
323
|
+
}
|
|
324
|
+
return this.cache.get(canonicalFilePath);
|
|
325
|
+
}
|
|
326
|
+
createLogicalProjectPath(file, rootDir) {
|
|
327
|
+
const logicalPath = stripExtension(file.substr(rootDir.length));
|
|
328
|
+
return logicalPath.startsWith("/") ? logicalPath : "/" + logicalPath;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
function isWithinBasePath(base, path) {
|
|
332
|
+
return isLocalRelativePath(relative(base, path));
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/node_js_file_system.mjs
|
|
336
|
+
import {
|
|
337
|
+
copyFileSync,
|
|
338
|
+
existsSync,
|
|
339
|
+
lstatSync,
|
|
340
|
+
mkdirSync,
|
|
341
|
+
readFileSync,
|
|
342
|
+
readdirSync,
|
|
343
|
+
realpathSync,
|
|
344
|
+
renameSync,
|
|
345
|
+
rmdirSync,
|
|
346
|
+
statSync,
|
|
347
|
+
symlinkSync,
|
|
348
|
+
unlinkSync,
|
|
349
|
+
writeFileSync
|
|
350
|
+
} from "fs";
|
|
351
|
+
import module from "module";
|
|
352
|
+
import {
|
|
353
|
+
basename as basename2,
|
|
354
|
+
dirname as dirname2,
|
|
355
|
+
extname,
|
|
356
|
+
isAbsolute,
|
|
357
|
+
join as join2,
|
|
358
|
+
relative as relative2,
|
|
359
|
+
resolve as resolve2
|
|
360
|
+
} from "path";
|
|
361
|
+
import { fileURLToPath } from "url";
|
|
362
|
+
var NodeJSPathManipulation = class {
|
|
363
|
+
pwd() {
|
|
364
|
+
return this.normalize(process.cwd());
|
|
365
|
+
}
|
|
366
|
+
chdir(dir) {
|
|
367
|
+
process.chdir(dir);
|
|
368
|
+
}
|
|
369
|
+
resolve(...paths) {
|
|
370
|
+
return this.normalize(resolve2(...paths));
|
|
371
|
+
}
|
|
372
|
+
dirname(file) {
|
|
373
|
+
return this.normalize(dirname2(file));
|
|
374
|
+
}
|
|
375
|
+
join(basePath, ...paths) {
|
|
376
|
+
return this.normalize(join2(basePath, ...paths));
|
|
377
|
+
}
|
|
378
|
+
isRoot(path) {
|
|
379
|
+
return this.dirname(path) === this.normalize(path);
|
|
380
|
+
}
|
|
381
|
+
isRooted(path) {
|
|
382
|
+
return isAbsolute(path);
|
|
383
|
+
}
|
|
384
|
+
relative(from, to) {
|
|
385
|
+
return this.normalize(relative2(from, to));
|
|
386
|
+
}
|
|
387
|
+
basename(filePath, extension) {
|
|
388
|
+
return basename2(filePath, extension);
|
|
389
|
+
}
|
|
390
|
+
extname(path) {
|
|
391
|
+
return extname(path);
|
|
392
|
+
}
|
|
393
|
+
normalize(path) {
|
|
394
|
+
return path.replace(/\\/g, "/");
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
var isCommonJS = typeof __filename !== "undefined";
|
|
398
|
+
var currentFileUrl = isCommonJS ? null : __ESM_IMPORT_META_URL__;
|
|
399
|
+
var currentFileName = isCommonJS ? __filename : fileURLToPath(currentFileUrl);
|
|
400
|
+
var NodeJSReadonlyFileSystem = class extends NodeJSPathManipulation {
|
|
401
|
+
constructor() {
|
|
402
|
+
super(...arguments);
|
|
403
|
+
this._caseSensitive = void 0;
|
|
404
|
+
}
|
|
405
|
+
isCaseSensitive() {
|
|
406
|
+
if (this._caseSensitive === void 0) {
|
|
407
|
+
this._caseSensitive = !existsSync(this.normalize(toggleCase(currentFileName)));
|
|
408
|
+
}
|
|
409
|
+
return this._caseSensitive;
|
|
410
|
+
}
|
|
411
|
+
exists(path) {
|
|
412
|
+
return existsSync(path);
|
|
413
|
+
}
|
|
414
|
+
readFile(path) {
|
|
415
|
+
return readFileSync(path, "utf8");
|
|
416
|
+
}
|
|
417
|
+
readFileBuffer(path) {
|
|
418
|
+
return readFileSync(path);
|
|
419
|
+
}
|
|
420
|
+
readdir(path) {
|
|
421
|
+
return readdirSync(path);
|
|
422
|
+
}
|
|
423
|
+
lstat(path) {
|
|
424
|
+
return lstatSync(path);
|
|
425
|
+
}
|
|
426
|
+
stat(path) {
|
|
427
|
+
return statSync(path);
|
|
428
|
+
}
|
|
429
|
+
realpath(path) {
|
|
430
|
+
return this.resolve(realpathSync(path));
|
|
431
|
+
}
|
|
432
|
+
getDefaultLibLocation() {
|
|
433
|
+
const requireFn = isCommonJS ? __require : module.createRequire(currentFileUrl);
|
|
434
|
+
return this.resolve(requireFn.resolve("typescript"), "..");
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
var NodeJSFileSystem = class extends NodeJSReadonlyFileSystem {
|
|
438
|
+
writeFile(path, data, exclusive = false) {
|
|
439
|
+
writeFileSync(path, data, exclusive ? { flag: "wx" } : void 0);
|
|
440
|
+
}
|
|
441
|
+
removeFile(path) {
|
|
442
|
+
unlinkSync(path);
|
|
443
|
+
}
|
|
444
|
+
symlink(target, path) {
|
|
445
|
+
symlinkSync(target, path);
|
|
446
|
+
}
|
|
447
|
+
copyFile(from, to) {
|
|
448
|
+
copyFileSync(from, to);
|
|
449
|
+
}
|
|
450
|
+
moveFile(from, to) {
|
|
451
|
+
renameSync(from, to);
|
|
452
|
+
}
|
|
453
|
+
ensureDir(path) {
|
|
454
|
+
const parents = [];
|
|
455
|
+
while (!this.isRoot(path) && !this.exists(path)) {
|
|
456
|
+
parents.push(path);
|
|
457
|
+
path = this.dirname(path);
|
|
458
|
+
}
|
|
459
|
+
while (parents.length) {
|
|
460
|
+
this.safeMkdir(parents.pop());
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
removeDeep(path) {
|
|
464
|
+
rmdirSync(path, { recursive: true });
|
|
465
|
+
}
|
|
466
|
+
safeMkdir(path) {
|
|
467
|
+
try {
|
|
468
|
+
mkdirSync(path);
|
|
469
|
+
} catch (err) {
|
|
470
|
+
if (!this.exists(path) || !this.stat(path).isDirectory()) {
|
|
471
|
+
throw err;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
function toggleCase(str) {
|
|
477
|
+
return str.replace(/\w/g, (ch) => ch.toUpperCase() === ch ? ch.toLowerCase() : ch.toUpperCase());
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/content_origin.mjs
|
|
481
|
+
var ContentOrigin;
|
|
482
|
+
(function(ContentOrigin2) {
|
|
483
|
+
ContentOrigin2[ContentOrigin2["Provided"] = 0] = "Provided";
|
|
484
|
+
ContentOrigin2[ContentOrigin2["Inline"] = 1] = "Inline";
|
|
485
|
+
ContentOrigin2[ContentOrigin2["FileSystem"] = 2] = "FileSystem";
|
|
486
|
+
})(ContentOrigin || (ContentOrigin = {}));
|
|
487
|
+
|
|
488
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file.mjs
|
|
489
|
+
import mapHelpers from "convert-source-map";
|
|
490
|
+
import { decode, encode } from "sourcemap-codec";
|
|
491
|
+
|
|
492
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/segment_marker.mjs
|
|
493
|
+
function compareSegments(a, b) {
|
|
494
|
+
return a.position - b.position;
|
|
495
|
+
}
|
|
496
|
+
function offsetSegment(startOfLinePositions, marker, offset) {
|
|
497
|
+
if (offset === 0) {
|
|
498
|
+
return marker;
|
|
499
|
+
}
|
|
500
|
+
let line = marker.line;
|
|
501
|
+
const position = marker.position + offset;
|
|
502
|
+
while (line < startOfLinePositions.length - 1 && startOfLinePositions[line + 1] <= position) {
|
|
503
|
+
line++;
|
|
504
|
+
}
|
|
505
|
+
while (line > 0 && startOfLinePositions[line] > position) {
|
|
506
|
+
line--;
|
|
507
|
+
}
|
|
508
|
+
const column = position - startOfLinePositions[line];
|
|
509
|
+
return { line, column, position, next: void 0 };
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file.mjs
|
|
513
|
+
function removeSourceMapComments(contents) {
|
|
514
|
+
return mapHelpers.removeMapFileComments(mapHelpers.removeComments(contents)).replace(/\n\n$/, "\n");
|
|
515
|
+
}
|
|
516
|
+
var SourceFile = class {
|
|
517
|
+
constructor(sourcePath, contents, rawMap, sources, fs3) {
|
|
518
|
+
this.sourcePath = sourcePath;
|
|
519
|
+
this.contents = contents;
|
|
520
|
+
this.rawMap = rawMap;
|
|
521
|
+
this.sources = sources;
|
|
522
|
+
this.fs = fs3;
|
|
523
|
+
this.contents = removeSourceMapComments(contents);
|
|
524
|
+
this.startOfLinePositions = computeStartOfLinePositions(this.contents);
|
|
525
|
+
this.flattenedMappings = this.flattenMappings();
|
|
526
|
+
}
|
|
527
|
+
renderFlattenedSourceMap() {
|
|
528
|
+
const sources = new IndexedMap();
|
|
529
|
+
const names = new IndexedSet();
|
|
530
|
+
const mappings = [];
|
|
531
|
+
const sourcePathDir = this.fs.dirname(this.sourcePath);
|
|
532
|
+
const relativeSourcePathCache = new Cache((input) => this.fs.relative(sourcePathDir, input));
|
|
533
|
+
for (const mapping of this.flattenedMappings) {
|
|
534
|
+
const sourceIndex = sources.set(relativeSourcePathCache.get(mapping.originalSource.sourcePath), mapping.originalSource.contents);
|
|
535
|
+
const mappingArray = [
|
|
536
|
+
mapping.generatedSegment.column,
|
|
537
|
+
sourceIndex,
|
|
538
|
+
mapping.originalSegment.line,
|
|
539
|
+
mapping.originalSegment.column
|
|
540
|
+
];
|
|
541
|
+
if (mapping.name !== void 0) {
|
|
542
|
+
const nameIndex = names.add(mapping.name);
|
|
543
|
+
mappingArray.push(nameIndex);
|
|
544
|
+
}
|
|
545
|
+
const line = mapping.generatedSegment.line;
|
|
546
|
+
while (line >= mappings.length) {
|
|
547
|
+
mappings.push([]);
|
|
548
|
+
}
|
|
549
|
+
mappings[line].push(mappingArray);
|
|
550
|
+
}
|
|
551
|
+
const sourceMap = {
|
|
552
|
+
version: 3,
|
|
553
|
+
file: this.fs.relative(sourcePathDir, this.sourcePath),
|
|
554
|
+
sources: sources.keys,
|
|
555
|
+
names: names.values,
|
|
556
|
+
mappings: encode(mappings),
|
|
557
|
+
sourcesContent: sources.values
|
|
558
|
+
};
|
|
559
|
+
return sourceMap;
|
|
560
|
+
}
|
|
561
|
+
getOriginalLocation(line, column) {
|
|
562
|
+
if (this.flattenedMappings.length === 0) {
|
|
563
|
+
return null;
|
|
564
|
+
}
|
|
565
|
+
let position;
|
|
566
|
+
if (line < this.startOfLinePositions.length) {
|
|
567
|
+
position = this.startOfLinePositions[line] + column;
|
|
568
|
+
} else {
|
|
569
|
+
position = this.contents.length;
|
|
570
|
+
}
|
|
571
|
+
const locationSegment = { line, column, position, next: void 0 };
|
|
572
|
+
let mappingIndex = findLastMappingIndexBefore(this.flattenedMappings, locationSegment, false, 0);
|
|
573
|
+
if (mappingIndex < 0) {
|
|
574
|
+
mappingIndex = 0;
|
|
575
|
+
}
|
|
576
|
+
const { originalSegment, originalSource, generatedSegment } = this.flattenedMappings[mappingIndex];
|
|
577
|
+
const offset = locationSegment.position - generatedSegment.position;
|
|
578
|
+
const offsetOriginalSegment = offsetSegment(originalSource.startOfLinePositions, originalSegment, offset);
|
|
579
|
+
return {
|
|
580
|
+
file: originalSource.sourcePath,
|
|
581
|
+
line: offsetOriginalSegment.line,
|
|
582
|
+
column: offsetOriginalSegment.column
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
flattenMappings() {
|
|
586
|
+
const mappings = parseMappings(this.rawMap && this.rawMap.map, this.sources, this.startOfLinePositions);
|
|
587
|
+
ensureOriginalSegmentLinks(mappings);
|
|
588
|
+
const flattenedMappings = [];
|
|
589
|
+
for (let mappingIndex = 0; mappingIndex < mappings.length; mappingIndex++) {
|
|
590
|
+
const aToBmapping = mappings[mappingIndex];
|
|
591
|
+
const bSource = aToBmapping.originalSource;
|
|
592
|
+
if (bSource.flattenedMappings.length === 0) {
|
|
593
|
+
flattenedMappings.push(aToBmapping);
|
|
594
|
+
continue;
|
|
595
|
+
}
|
|
596
|
+
const incomingStart = aToBmapping.originalSegment;
|
|
597
|
+
const incomingEnd = incomingStart.next;
|
|
598
|
+
let outgoingStartIndex = findLastMappingIndexBefore(bSource.flattenedMappings, incomingStart, false, 0);
|
|
599
|
+
if (outgoingStartIndex < 0) {
|
|
600
|
+
outgoingStartIndex = 0;
|
|
601
|
+
}
|
|
602
|
+
const outgoingEndIndex = incomingEnd !== void 0 ? findLastMappingIndexBefore(bSource.flattenedMappings, incomingEnd, true, outgoingStartIndex) : bSource.flattenedMappings.length - 1;
|
|
603
|
+
for (let bToCmappingIndex = outgoingStartIndex; bToCmappingIndex <= outgoingEndIndex; bToCmappingIndex++) {
|
|
604
|
+
const bToCmapping = bSource.flattenedMappings[bToCmappingIndex];
|
|
605
|
+
flattenedMappings.push(mergeMappings(this, aToBmapping, bToCmapping));
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return flattenedMappings;
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
function findLastMappingIndexBefore(mappings, marker, exclusive, lowerIndex) {
|
|
612
|
+
let upperIndex = mappings.length - 1;
|
|
613
|
+
const test = exclusive ? -1 : 0;
|
|
614
|
+
if (compareSegments(mappings[lowerIndex].generatedSegment, marker) > test) {
|
|
615
|
+
return -1;
|
|
616
|
+
}
|
|
617
|
+
let matchingIndex = -1;
|
|
618
|
+
while (lowerIndex <= upperIndex) {
|
|
619
|
+
const index = upperIndex + lowerIndex >> 1;
|
|
620
|
+
if (compareSegments(mappings[index].generatedSegment, marker) <= test) {
|
|
621
|
+
matchingIndex = index;
|
|
622
|
+
lowerIndex = index + 1;
|
|
623
|
+
} else {
|
|
624
|
+
upperIndex = index - 1;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return matchingIndex;
|
|
628
|
+
}
|
|
629
|
+
function mergeMappings(generatedSource, ab, bc) {
|
|
630
|
+
const name = bc.name || ab.name;
|
|
631
|
+
const diff = compareSegments(bc.generatedSegment, ab.originalSegment);
|
|
632
|
+
if (diff > 0) {
|
|
633
|
+
return {
|
|
634
|
+
name,
|
|
635
|
+
generatedSegment: offsetSegment(generatedSource.startOfLinePositions, ab.generatedSegment, diff),
|
|
636
|
+
originalSource: bc.originalSource,
|
|
637
|
+
originalSegment: bc.originalSegment
|
|
638
|
+
};
|
|
639
|
+
} else {
|
|
640
|
+
return {
|
|
641
|
+
name,
|
|
642
|
+
generatedSegment: ab.generatedSegment,
|
|
643
|
+
originalSource: bc.originalSource,
|
|
644
|
+
originalSegment: offsetSegment(bc.originalSource.startOfLinePositions, bc.originalSegment, -diff)
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function parseMappings(rawMap, sources, generatedSourceStartOfLinePositions) {
|
|
649
|
+
if (rawMap === null) {
|
|
650
|
+
return [];
|
|
651
|
+
}
|
|
652
|
+
const rawMappings = decode(rawMap.mappings);
|
|
653
|
+
if (rawMappings === null) {
|
|
654
|
+
return [];
|
|
655
|
+
}
|
|
656
|
+
const mappings = [];
|
|
657
|
+
for (let generatedLine = 0; generatedLine < rawMappings.length; generatedLine++) {
|
|
658
|
+
const generatedLineMappings = rawMappings[generatedLine];
|
|
659
|
+
for (const rawMapping of generatedLineMappings) {
|
|
660
|
+
if (rawMapping.length >= 4) {
|
|
661
|
+
const originalSource = sources[rawMapping[1]];
|
|
662
|
+
if (originalSource === null || originalSource === void 0) {
|
|
663
|
+
continue;
|
|
664
|
+
}
|
|
665
|
+
const generatedColumn = rawMapping[0];
|
|
666
|
+
const name = rawMapping.length === 5 ? rawMap.names[rawMapping[4]] : void 0;
|
|
667
|
+
const line = rawMapping[2];
|
|
668
|
+
const column = rawMapping[3];
|
|
669
|
+
const generatedSegment = {
|
|
670
|
+
line: generatedLine,
|
|
671
|
+
column: generatedColumn,
|
|
672
|
+
position: generatedSourceStartOfLinePositions[generatedLine] + generatedColumn,
|
|
673
|
+
next: void 0
|
|
674
|
+
};
|
|
675
|
+
const originalSegment = {
|
|
676
|
+
line,
|
|
677
|
+
column,
|
|
678
|
+
position: originalSource.startOfLinePositions[line] + column,
|
|
679
|
+
next: void 0
|
|
680
|
+
};
|
|
681
|
+
mappings.push({ name, generatedSegment, originalSegment, originalSource });
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
return mappings;
|
|
686
|
+
}
|
|
687
|
+
function extractOriginalSegments(mappings) {
|
|
688
|
+
const originalSegments = new Map();
|
|
689
|
+
for (const mapping of mappings) {
|
|
690
|
+
const originalSource = mapping.originalSource;
|
|
691
|
+
if (!originalSegments.has(originalSource)) {
|
|
692
|
+
originalSegments.set(originalSource, []);
|
|
693
|
+
}
|
|
694
|
+
const segments = originalSegments.get(originalSource);
|
|
695
|
+
segments.push(mapping.originalSegment);
|
|
696
|
+
}
|
|
697
|
+
originalSegments.forEach((segmentMarkers) => segmentMarkers.sort(compareSegments));
|
|
698
|
+
return originalSegments;
|
|
699
|
+
}
|
|
700
|
+
function ensureOriginalSegmentLinks(mappings) {
|
|
701
|
+
const segmentsBySource = extractOriginalSegments(mappings);
|
|
702
|
+
segmentsBySource.forEach((markers) => {
|
|
703
|
+
for (let i = 0; i < markers.length - 1; i++) {
|
|
704
|
+
markers[i].next = markers[i + 1];
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
function computeStartOfLinePositions(str) {
|
|
709
|
+
const NEWLINE_MARKER_OFFSET = 1;
|
|
710
|
+
const lineLengths = computeLineLengths(str);
|
|
711
|
+
const startPositions = [0];
|
|
712
|
+
for (let i = 0; i < lineLengths.length - 1; i++) {
|
|
713
|
+
startPositions.push(startPositions[i] + lineLengths[i] + NEWLINE_MARKER_OFFSET);
|
|
714
|
+
}
|
|
715
|
+
return startPositions;
|
|
716
|
+
}
|
|
717
|
+
function computeLineLengths(str) {
|
|
718
|
+
return str.split(/\n/).map((s) => s.length);
|
|
719
|
+
}
|
|
720
|
+
var IndexedMap = class {
|
|
721
|
+
constructor() {
|
|
722
|
+
this.map = new Map();
|
|
723
|
+
this.keys = [];
|
|
724
|
+
this.values = [];
|
|
725
|
+
}
|
|
726
|
+
set(key, value) {
|
|
727
|
+
if (this.map.has(key)) {
|
|
728
|
+
return this.map.get(key);
|
|
729
|
+
}
|
|
730
|
+
const index = this.values.push(value) - 1;
|
|
731
|
+
this.keys.push(key);
|
|
732
|
+
this.map.set(key, index);
|
|
733
|
+
return index;
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
var IndexedSet = class {
|
|
737
|
+
constructor() {
|
|
738
|
+
this.map = new Map();
|
|
739
|
+
this.values = [];
|
|
740
|
+
}
|
|
741
|
+
add(value) {
|
|
742
|
+
if (this.map.has(value)) {
|
|
743
|
+
return this.map.get(value);
|
|
744
|
+
}
|
|
745
|
+
const index = this.values.push(value) - 1;
|
|
746
|
+
this.map.set(value, index);
|
|
747
|
+
return index;
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
var Cache = class {
|
|
751
|
+
constructor(computeFn) {
|
|
752
|
+
this.computeFn = computeFn;
|
|
753
|
+
this.map = new Map();
|
|
754
|
+
}
|
|
755
|
+
get(input) {
|
|
756
|
+
if (!this.map.has(input)) {
|
|
757
|
+
this.map.set(input, this.computeFn(input));
|
|
758
|
+
}
|
|
759
|
+
return this.map.get(input);
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file_loader.mjs
|
|
764
|
+
import mapHelpers2 from "convert-source-map";
|
|
765
|
+
var SCHEME_MATCHER = /^([a-z][a-z0-9.-]*):\/\//i;
|
|
766
|
+
var SourceFileLoader = class {
|
|
767
|
+
constructor(fs3, logger, schemeMap) {
|
|
768
|
+
this.fs = fs3;
|
|
769
|
+
this.logger = logger;
|
|
770
|
+
this.schemeMap = schemeMap;
|
|
771
|
+
this.currentPaths = [];
|
|
772
|
+
}
|
|
773
|
+
loadSourceFile(sourcePath, contents = null, mapAndPath = null) {
|
|
774
|
+
const contentsOrigin = contents !== null ? ContentOrigin.Provided : ContentOrigin.FileSystem;
|
|
775
|
+
const sourceMapInfo = mapAndPath && __spreadValues({ origin: ContentOrigin.Provided }, mapAndPath);
|
|
776
|
+
return this.loadSourceFileInternal(sourcePath, contents, contentsOrigin, sourceMapInfo);
|
|
777
|
+
}
|
|
778
|
+
loadSourceFileInternal(sourcePath, contents, sourceOrigin, sourceMapInfo) {
|
|
779
|
+
const previousPaths = this.currentPaths.slice();
|
|
780
|
+
try {
|
|
781
|
+
if (contents === null) {
|
|
782
|
+
if (!this.fs.exists(sourcePath)) {
|
|
783
|
+
return null;
|
|
784
|
+
}
|
|
785
|
+
contents = this.readSourceFile(sourcePath);
|
|
786
|
+
}
|
|
787
|
+
if (sourceMapInfo === null) {
|
|
788
|
+
sourceMapInfo = this.loadSourceMap(sourcePath, contents, sourceOrigin);
|
|
789
|
+
}
|
|
790
|
+
let sources = [];
|
|
791
|
+
if (sourceMapInfo !== null) {
|
|
792
|
+
const basePath = sourceMapInfo.mapPath || sourcePath;
|
|
793
|
+
sources = this.processSources(basePath, sourceMapInfo);
|
|
794
|
+
}
|
|
795
|
+
return new SourceFile(sourcePath, contents, sourceMapInfo, sources, this.fs);
|
|
796
|
+
} catch (e) {
|
|
797
|
+
this.logger.warn(`Unable to fully load ${sourcePath} for source-map flattening: ${e.message}`);
|
|
798
|
+
return null;
|
|
799
|
+
} finally {
|
|
800
|
+
this.currentPaths = previousPaths;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
loadSourceMap(sourcePath, sourceContents, sourceOrigin) {
|
|
804
|
+
const lastLine = this.getLastNonEmptyLine(sourceContents);
|
|
805
|
+
const inline = mapHelpers2.commentRegex.exec(lastLine);
|
|
806
|
+
if (inline !== null) {
|
|
807
|
+
return {
|
|
808
|
+
map: mapHelpers2.fromComment(inline.pop()).sourcemap,
|
|
809
|
+
mapPath: null,
|
|
810
|
+
origin: ContentOrigin.Inline
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
if (sourceOrigin === ContentOrigin.Inline) {
|
|
814
|
+
return null;
|
|
815
|
+
}
|
|
816
|
+
const external = mapHelpers2.mapFileCommentRegex.exec(lastLine);
|
|
817
|
+
if (external) {
|
|
818
|
+
try {
|
|
819
|
+
const fileName = external[1] || external[2];
|
|
820
|
+
const externalMapPath = this.fs.resolve(this.fs.dirname(sourcePath), fileName);
|
|
821
|
+
return {
|
|
822
|
+
map: this.readRawSourceMap(externalMapPath),
|
|
823
|
+
mapPath: externalMapPath,
|
|
824
|
+
origin: ContentOrigin.FileSystem
|
|
825
|
+
};
|
|
826
|
+
} catch (e) {
|
|
827
|
+
this.logger.warn(`Unable to fully load ${sourcePath} for source-map flattening: ${e.message}`);
|
|
828
|
+
return null;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
const impliedMapPath = this.fs.resolve(sourcePath + ".map");
|
|
832
|
+
if (this.fs.exists(impliedMapPath)) {
|
|
833
|
+
return {
|
|
834
|
+
map: this.readRawSourceMap(impliedMapPath),
|
|
835
|
+
mapPath: impliedMapPath,
|
|
836
|
+
origin: ContentOrigin.FileSystem
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
return null;
|
|
840
|
+
}
|
|
841
|
+
processSources(basePath, { map, origin: sourceMapOrigin }) {
|
|
842
|
+
const sourceRoot = this.fs.resolve(this.fs.dirname(basePath), this.replaceSchemeWithPath(map.sourceRoot || ""));
|
|
843
|
+
return map.sources.map((source, index) => {
|
|
844
|
+
const path = this.fs.resolve(sourceRoot, this.replaceSchemeWithPath(source));
|
|
845
|
+
const content = map.sourcesContent && map.sourcesContent[index] || null;
|
|
846
|
+
const sourceOrigin = content !== null && sourceMapOrigin !== ContentOrigin.Provided ? ContentOrigin.Inline : ContentOrigin.FileSystem;
|
|
847
|
+
return this.loadSourceFileInternal(path, content, sourceOrigin, null);
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
readSourceFile(sourcePath) {
|
|
851
|
+
this.trackPath(sourcePath);
|
|
852
|
+
return this.fs.readFile(sourcePath);
|
|
853
|
+
}
|
|
854
|
+
readRawSourceMap(mapPath) {
|
|
855
|
+
this.trackPath(mapPath);
|
|
856
|
+
return JSON.parse(this.fs.readFile(mapPath));
|
|
857
|
+
}
|
|
858
|
+
trackPath(path) {
|
|
859
|
+
if (this.currentPaths.includes(path)) {
|
|
860
|
+
throw new Error(`Circular source file mapping dependency: ${this.currentPaths.join(" -> ")} -> ${path}`);
|
|
861
|
+
}
|
|
862
|
+
this.currentPaths.push(path);
|
|
863
|
+
}
|
|
864
|
+
getLastNonEmptyLine(contents) {
|
|
865
|
+
let trailingWhitespaceIndex = contents.length - 1;
|
|
866
|
+
while (trailingWhitespaceIndex > 0 && (contents[trailingWhitespaceIndex] === "\n" || contents[trailingWhitespaceIndex] === "\r")) {
|
|
867
|
+
trailingWhitespaceIndex--;
|
|
868
|
+
}
|
|
869
|
+
let lastRealLineIndex = contents.lastIndexOf("\n", trailingWhitespaceIndex - 1);
|
|
870
|
+
if (lastRealLineIndex === -1) {
|
|
871
|
+
lastRealLineIndex = 0;
|
|
872
|
+
}
|
|
873
|
+
return contents.substr(lastRealLineIndex + 1);
|
|
874
|
+
}
|
|
875
|
+
replaceSchemeWithPath(path) {
|
|
876
|
+
return path.replace(SCHEME_MATCHER, (_, scheme) => this.schemeMap[scheme.toLowerCase()] || "");
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
export {
|
|
880
|
+
ConsoleLogger,
|
|
881
|
+
LogLevel,
|
|
882
|
+
LogicalFileSystem,
|
|
883
|
+
LogicalProjectPath,
|
|
884
|
+
NgtscCompilerHost,
|
|
885
|
+
NodeJSFileSystem,
|
|
886
|
+
SourceFile,
|
|
887
|
+
SourceFileLoader,
|
|
888
|
+
absoluteFrom,
|
|
889
|
+
absoluteFromSourceFile,
|
|
890
|
+
basename,
|
|
891
|
+
dirname,
|
|
892
|
+
getFileSystem,
|
|
893
|
+
getSourceFileOrError,
|
|
894
|
+
isLocalRelativePath,
|
|
895
|
+
isRoot,
|
|
896
|
+
isRooted,
|
|
897
|
+
join,
|
|
898
|
+
relative,
|
|
899
|
+
relativeFrom,
|
|
900
|
+
resolve,
|
|
901
|
+
setFileSystem,
|
|
902
|
+
toRelativeImport
|
|
903
|
+
};
|
|
904
|
+
/**
|
|
905
|
+
* @license
|
|
906
|
+
* Copyright Google LLC All Rights Reserved.
|
|
907
|
+
*
|
|
908
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
909
|
+
* found in the LICENSE file at https://angular.io/license
|
|
910
|
+
*/
|
|
911
|
+
//# sourceMappingURL=localize.js.map
|