123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- import {createRequire as __cjsCompatRequire} from 'module';
- const require = __cjsCompatRequire(import.meta.url);
-
- import {
- GLOBAL_DEFS_FOR_TERSER,
- GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
- constructorParametersDownlevelTransform
- } from "./chunk-ZSPLLTLI.js";
- import {
- DEFAULT_ERROR_CODE,
- DecoratorType,
- DocsExtractor,
- EmitFlags,
- EntryType,
- MemberTags,
- MemberType,
- NgCompiler,
- NgCompilerHost,
- NgtscProgram,
- PatchedProgramIncrementalBuildStrategy,
- SOURCE,
- UNKNOWN_ERROR_CODE,
- calcProjectFileAndBasePath,
- createCompilerHost,
- createProgram,
- defaultGatherDiagnostics,
- exitCodeFromResult,
- formatDiagnostics,
- freshCompilationTicket,
- incrementalFromStateTicket,
- isDocEntryWithSourceInfo,
- isTsDiagnostic,
- performCompilation,
- readConfiguration
- } from "./chunk-Z4732XCW.js";
- import {
- angularJitApplicationTransform,
- getDownlevelDecoratorsTransform,
- getInitializerApiJitTransform
- } from "./chunk-YEQZ4XY7.js";
- import {
- OptimizeFor,
- TsCreateProgramDriver
- } from "./chunk-YNWO773W.js";
- import {
- ErrorCode,
- isLocalCompilationDiagnostics,
- ngErrorCode
- } from "./chunk-KOIBHR3X.js";
- import {
- ActivePerfRecorder,
- PerfPhase
- } from "./chunk-I6R3GL3L.js";
- import {
- ConsoleLogger,
- LogLevel
- } from "./chunk-GBKXY6BH.js";
- import {
- LogicalFileSystem,
- LogicalProjectPath,
- NgtscCompilerHost,
- NodeJSFileSystem,
- absoluteFrom,
- absoluteFromSourceFile,
- basename,
- createFileSystemTsReadDirectoryFn,
- dirname,
- getFileSystem,
- getSourceFileOrError,
- isLocalRelativePath,
- isRoot,
- isRooted,
- join,
- relative,
- relativeFrom,
- resolve,
- setFileSystem,
- toRelativeImport
- } from "./chunk-STORTTKY.js";
- import "./chunk-KPQ72R34.js";
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
- import { Version } from "@angular/compiler";
- var VERSION = new Version("19.2.4");
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/tsc_plugin.mjs
- var NgTscPlugin = class {
- ngOptions;
- name = "ngtsc";
- options = null;
- host = null;
- _compiler = null;
- get compiler() {
- if (this._compiler === null) {
- throw new Error("Lifecycle error: setupCompilation() must be called first.");
- }
- return this._compiler;
- }
- constructor(ngOptions) {
- this.ngOptions = ngOptions;
- setFileSystem(new NodeJSFileSystem());
- }
- wrapHost(host, inputFiles, options) {
- this.options = { ...this.ngOptions, ...options };
- this.host = NgCompilerHost.wrap(host, inputFiles, this.options, null);
- return this.host;
- }
- setupCompilation(program, oldProgram) {
- var _a;
- const perfRecorder = ActivePerfRecorder.zeroedToNow();
- if (this.host === null || this.options === null) {
- throw new Error("Lifecycle error: setupCompilation() before wrapHost().");
- }
- this.host.postProgramCreationCleanup();
- const programDriver = new TsCreateProgramDriver(program, this.host, this.options, this.host.shimExtensionPrefixes);
- const strategy = new PatchedProgramIncrementalBuildStrategy();
- const oldState = oldProgram !== void 0 ? strategy.getIncrementalState(oldProgram) : null;
- let ticket;
- const modifiedResourceFiles = /* @__PURE__ */ new Set();
- if (this.host.getModifiedResourceFiles !== void 0) {
- for (const resourceFile of (_a = this.host.getModifiedResourceFiles()) != null ? _a : []) {
- modifiedResourceFiles.add(resolve(resourceFile));
- }
- }
- if (oldProgram === void 0 || oldState === null) {
- ticket = freshCompilationTicket(
- program,
- this.options,
- strategy,
- programDriver,
- perfRecorder,
- false,
- false
- );
- } else {
- strategy.toNextBuildStrategy().getIncrementalState(oldProgram);
- ticket = incrementalFromStateTicket(oldProgram, oldState, program, this.options, strategy, programDriver, modifiedResourceFiles, perfRecorder, false, false);
- }
- this._compiler = NgCompiler.fromTicket(ticket, this.host);
- return {
- ignoreForDiagnostics: this._compiler.ignoreForDiagnostics,
- ignoreForEmit: this._compiler.ignoreForEmit
- };
- }
- getDiagnostics(file) {
- if (file === void 0) {
- return this.compiler.getDiagnostics();
- }
- return this.compiler.getDiagnosticsForFile(file, OptimizeFor.WholeProgram);
- }
- getOptionDiagnostics() {
- return this.compiler.getOptionDiagnostics();
- }
- getNextProgram() {
- return this.compiler.getCurrentProgram();
- }
- createTransformers() {
- this.compiler.perfRecorder.phase(PerfPhase.TypeScriptEmit);
- return this.compiler.prepareEmit().transformers;
- }
- };
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/index.mjs
- setFileSystem(new NodeJSFileSystem());
- export {
- ConsoleLogger,
- DEFAULT_ERROR_CODE,
- DecoratorType,
- DocsExtractor,
- EmitFlags,
- EntryType,
- ErrorCode,
- GLOBAL_DEFS_FOR_TERSER,
- GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
- LogLevel,
- LogicalFileSystem,
- LogicalProjectPath,
- MemberTags,
- MemberType,
- NgTscPlugin,
- NgtscCompilerHost,
- NgtscProgram,
- NodeJSFileSystem,
- OptimizeFor,
- SOURCE,
- UNKNOWN_ERROR_CODE,
- VERSION,
- absoluteFrom,
- absoluteFromSourceFile,
- angularJitApplicationTransform,
- basename,
- calcProjectFileAndBasePath,
- constructorParametersDownlevelTransform,
- createCompilerHost,
- createFileSystemTsReadDirectoryFn,
- createProgram,
- defaultGatherDiagnostics,
- dirname,
- exitCodeFromResult,
- formatDiagnostics,
- getDownlevelDecoratorsTransform,
- getFileSystem,
- getInitializerApiJitTransform,
- getSourceFileOrError,
- isDocEntryWithSourceInfo,
- isLocalCompilationDiagnostics,
- isLocalRelativePath,
- isRoot,
- isRooted,
- isTsDiagnostic,
- join,
- ngErrorCode,
- performCompilation,
- readConfiguration,
- relative,
- relativeFrom,
- resolve,
- setFileSystem,
- toRelativeImport
- };
- /**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.dev/license
- */
- //# sourceMappingURL=index.js.map
|