Updated the files.

This commit is contained in:
Batuhan Berk Başoğlu 2024-02-08 19:38:41 -05:00
parent 1553e6b971
commit 753967d4f5
23418 changed files with 3784666 additions and 0 deletions

View file

@ -0,0 +1,419 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file.mjs
import { decode, encode } from "@jridgewell/sourcemap-codec";
import mapHelpers from "convert-source-map";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/segment_marker.mjs
function compareSegments(a, b) {
return a.position - b.position;
}
function offsetSegment(startOfLinePositions, marker, offset) {
if (offset === 0) {
return marker;
}
let line = marker.line;
const position = marker.position + offset;
while (line < startOfLinePositions.length - 1 && startOfLinePositions[line + 1] <= position) {
line++;
}
while (line > 0 && startOfLinePositions[line] > position) {
line--;
}
const column = position - startOfLinePositions[line];
return { line, column, position, next: void 0 };
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file.mjs
function removeSourceMapComments(contents) {
return mapHelpers.removeMapFileComments(mapHelpers.removeComments(contents)).replace(/\n\n$/, "\n");
}
var SourceFile = class {
constructor(sourcePath, contents, rawMap, sources, fs) {
this.sourcePath = sourcePath;
this.contents = contents;
this.rawMap = rawMap;
this.sources = sources;
this.fs = fs;
this.contents = removeSourceMapComments(contents);
this.startOfLinePositions = computeStartOfLinePositions(this.contents);
this.flattenedMappings = this.flattenMappings();
}
renderFlattenedSourceMap() {
const sources = new IndexedMap();
const names = new IndexedSet();
const mappings = [];
const sourcePathDir = this.fs.dirname(this.sourcePath);
const relativeSourcePathCache = new Cache((input) => this.fs.relative(sourcePathDir, input));
for (const mapping of this.flattenedMappings) {
const sourceIndex = sources.set(relativeSourcePathCache.get(mapping.originalSource.sourcePath), mapping.originalSource.contents);
const mappingArray = [
mapping.generatedSegment.column,
sourceIndex,
mapping.originalSegment.line,
mapping.originalSegment.column
];
if (mapping.name !== void 0) {
const nameIndex = names.add(mapping.name);
mappingArray.push(nameIndex);
}
const line = mapping.generatedSegment.line;
while (line >= mappings.length) {
mappings.push([]);
}
mappings[line].push(mappingArray);
}
const sourceMap = {
version: 3,
file: this.fs.relative(sourcePathDir, this.sourcePath),
sources: sources.keys,
names: names.values,
mappings: encode(mappings),
sourcesContent: sources.values
};
return sourceMap;
}
getOriginalLocation(line, column) {
if (this.flattenedMappings.length === 0) {
return null;
}
let position;
if (line < this.startOfLinePositions.length) {
position = this.startOfLinePositions[line] + column;
} else {
position = this.contents.length;
}
const locationSegment = { line, column, position, next: void 0 };
let mappingIndex = findLastMappingIndexBefore(this.flattenedMappings, locationSegment, false, 0);
if (mappingIndex < 0) {
mappingIndex = 0;
}
const { originalSegment, originalSource, generatedSegment } = this.flattenedMappings[mappingIndex];
const offset = locationSegment.position - generatedSegment.position;
const offsetOriginalSegment = offsetSegment(originalSource.startOfLinePositions, originalSegment, offset);
return {
file: originalSource.sourcePath,
line: offsetOriginalSegment.line,
column: offsetOriginalSegment.column
};
}
flattenMappings() {
const mappings = parseMappings(this.rawMap && this.rawMap.map, this.sources, this.startOfLinePositions);
ensureOriginalSegmentLinks(mappings);
const flattenedMappings = [];
for (let mappingIndex = 0; mappingIndex < mappings.length; mappingIndex++) {
const aToBmapping = mappings[mappingIndex];
const bSource = aToBmapping.originalSource;
if (bSource.flattenedMappings.length === 0) {
flattenedMappings.push(aToBmapping);
continue;
}
const incomingStart = aToBmapping.originalSegment;
const incomingEnd = incomingStart.next;
let outgoingStartIndex = findLastMappingIndexBefore(bSource.flattenedMappings, incomingStart, false, 0);
if (outgoingStartIndex < 0) {
outgoingStartIndex = 0;
}
const outgoingEndIndex = incomingEnd !== void 0 ? findLastMappingIndexBefore(bSource.flattenedMappings, incomingEnd, true, outgoingStartIndex) : bSource.flattenedMappings.length - 1;
for (let bToCmappingIndex = outgoingStartIndex; bToCmappingIndex <= outgoingEndIndex; bToCmappingIndex++) {
const bToCmapping = bSource.flattenedMappings[bToCmappingIndex];
flattenedMappings.push(mergeMappings(this, aToBmapping, bToCmapping));
}
}
return flattenedMappings;
}
};
function findLastMappingIndexBefore(mappings, marker, exclusive, lowerIndex) {
let upperIndex = mappings.length - 1;
const test = exclusive ? -1 : 0;
if (compareSegments(mappings[lowerIndex].generatedSegment, marker) > test) {
return -1;
}
let matchingIndex = -1;
while (lowerIndex <= upperIndex) {
const index = upperIndex + lowerIndex >> 1;
if (compareSegments(mappings[index].generatedSegment, marker) <= test) {
matchingIndex = index;
lowerIndex = index + 1;
} else {
upperIndex = index - 1;
}
}
return matchingIndex;
}
function mergeMappings(generatedSource, ab, bc) {
const name = bc.name || ab.name;
const diff = compareSegments(bc.generatedSegment, ab.originalSegment);
if (diff > 0) {
return {
name,
generatedSegment: offsetSegment(generatedSource.startOfLinePositions, ab.generatedSegment, diff),
originalSource: bc.originalSource,
originalSegment: bc.originalSegment
};
} else {
return {
name,
generatedSegment: ab.generatedSegment,
originalSource: bc.originalSource,
originalSegment: offsetSegment(bc.originalSource.startOfLinePositions, bc.originalSegment, -diff)
};
}
}
function parseMappings(rawMap, sources, generatedSourceStartOfLinePositions) {
if (rawMap === null) {
return [];
}
const rawMappings = decode(rawMap.mappings);
if (rawMappings === null) {
return [];
}
const mappings = [];
for (let generatedLine = 0; generatedLine < rawMappings.length; generatedLine++) {
const generatedLineMappings = rawMappings[generatedLine];
for (const rawMapping of generatedLineMappings) {
if (rawMapping.length >= 4) {
const originalSource = sources[rawMapping[1]];
if (originalSource === null || originalSource === void 0) {
continue;
}
const generatedColumn = rawMapping[0];
const name = rawMapping.length === 5 ? rawMap.names[rawMapping[4]] : void 0;
const line = rawMapping[2];
const column = rawMapping[3];
const generatedSegment = {
line: generatedLine,
column: generatedColumn,
position: generatedSourceStartOfLinePositions[generatedLine] + generatedColumn,
next: void 0
};
const originalSegment = {
line,
column,
position: originalSource.startOfLinePositions[line] + column,
next: void 0
};
mappings.push({ name, generatedSegment, originalSegment, originalSource });
}
}
}
return mappings;
}
function extractOriginalSegments(mappings) {
const originalSegments = /* @__PURE__ */ new Map();
for (const mapping of mappings) {
const originalSource = mapping.originalSource;
if (!originalSegments.has(originalSource)) {
originalSegments.set(originalSource, []);
}
const segments = originalSegments.get(originalSource);
segments.push(mapping.originalSegment);
}
originalSegments.forEach((segmentMarkers) => segmentMarkers.sort(compareSegments));
return originalSegments;
}
function ensureOriginalSegmentLinks(mappings) {
const segmentsBySource = extractOriginalSegments(mappings);
segmentsBySource.forEach((markers) => {
for (let i = 0; i < markers.length - 1; i++) {
markers[i].next = markers[i + 1];
}
});
}
function computeStartOfLinePositions(str) {
const NEWLINE_MARKER_OFFSET = 1;
const lineLengths = computeLineLengths(str);
const startPositions = [0];
for (let i = 0; i < lineLengths.length - 1; i++) {
startPositions.push(startPositions[i] + lineLengths[i] + NEWLINE_MARKER_OFFSET);
}
return startPositions;
}
function computeLineLengths(str) {
return str.split(/\n/).map((s) => s.length);
}
var IndexedMap = class {
constructor() {
this.map = /* @__PURE__ */ new Map();
this.keys = [];
this.values = [];
}
set(key, value) {
if (this.map.has(key)) {
return this.map.get(key);
}
const index = this.values.push(value) - 1;
this.keys.push(key);
this.map.set(key, index);
return index;
}
};
var IndexedSet = class {
constructor() {
this.map = /* @__PURE__ */ new Map();
this.values = [];
}
add(value) {
if (this.map.has(value)) {
return this.map.get(value);
}
const index = this.values.push(value) - 1;
this.map.set(value, index);
return index;
}
};
var Cache = class {
constructor(computeFn) {
this.computeFn = computeFn;
this.map = /* @__PURE__ */ new Map();
}
get(input) {
if (!this.map.has(input)) {
this.map.set(input, this.computeFn(input));
}
return this.map.get(input);
}
};
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file_loader.mjs
import mapHelpers2 from "convert-source-map";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/content_origin.mjs
var ContentOrigin;
(function(ContentOrigin2) {
ContentOrigin2[ContentOrigin2["Provided"] = 0] = "Provided";
ContentOrigin2[ContentOrigin2["Inline"] = 1] = "Inline";
ContentOrigin2[ContentOrigin2["FileSystem"] = 2] = "FileSystem";
})(ContentOrigin || (ContentOrigin = {}));
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file_loader.mjs
var SCHEME_MATCHER = /^([a-z][a-z0-9.-]*):\/\//i;
var SourceFileLoader = class {
constructor(fs, logger, schemeMap) {
this.fs = fs;
this.logger = logger;
this.schemeMap = schemeMap;
this.currentPaths = [];
}
loadSourceFile(sourcePath, contents = null, mapAndPath = null) {
const contentsOrigin = contents !== null ? ContentOrigin.Provided : ContentOrigin.FileSystem;
const sourceMapInfo = mapAndPath && { origin: ContentOrigin.Provided, ...mapAndPath };
return this.loadSourceFileInternal(sourcePath, contents, contentsOrigin, sourceMapInfo);
}
loadSourceFileInternal(sourcePath, contents, sourceOrigin, sourceMapInfo) {
const previousPaths = this.currentPaths.slice();
try {
if (contents === null) {
if (!this.fs.exists(sourcePath)) {
return null;
}
contents = this.readSourceFile(sourcePath);
}
if (sourceMapInfo === null) {
sourceMapInfo = this.loadSourceMap(sourcePath, contents, sourceOrigin);
}
let sources = [];
if (sourceMapInfo !== null) {
const basePath = sourceMapInfo.mapPath || sourcePath;
sources = this.processSources(basePath, sourceMapInfo);
}
return new SourceFile(sourcePath, contents, sourceMapInfo, sources, this.fs);
} catch (e) {
this.logger.warn(`Unable to fully load ${sourcePath} for source-map flattening: ${e.message}`);
return null;
} finally {
this.currentPaths = previousPaths;
}
}
loadSourceMap(sourcePath, sourceContents, sourceOrigin) {
const lastLine = this.getLastNonEmptyLine(sourceContents);
const inline = mapHelpers2.commentRegex.exec(lastLine);
if (inline !== null) {
return {
map: mapHelpers2.fromComment(inline.pop()).sourcemap,
mapPath: null,
origin: ContentOrigin.Inline
};
}
if (sourceOrigin === ContentOrigin.Inline) {
return null;
}
const external = mapHelpers2.mapFileCommentRegex.exec(lastLine);
if (external) {
try {
const fileName = external[1] || external[2];
const externalMapPath = this.fs.resolve(this.fs.dirname(sourcePath), fileName);
return {
map: this.readRawSourceMap(externalMapPath),
mapPath: externalMapPath,
origin: ContentOrigin.FileSystem
};
} catch (e) {
this.logger.warn(`Unable to fully load ${sourcePath} for source-map flattening: ${e.message}`);
return null;
}
}
const impliedMapPath = this.fs.resolve(sourcePath + ".map");
if (this.fs.exists(impliedMapPath)) {
return {
map: this.readRawSourceMap(impliedMapPath),
mapPath: impliedMapPath,
origin: ContentOrigin.FileSystem
};
}
return null;
}
processSources(basePath, { map, origin: sourceMapOrigin }) {
const sourceRoot = this.fs.resolve(this.fs.dirname(basePath), this.replaceSchemeWithPath(map.sourceRoot || ""));
return map.sources.map((source, index) => {
const path = this.fs.resolve(sourceRoot, this.replaceSchemeWithPath(source));
const content = map.sourcesContent && map.sourcesContent[index] || null;
const sourceOrigin = content !== null && sourceMapOrigin !== ContentOrigin.Provided ? ContentOrigin.Inline : ContentOrigin.FileSystem;
return this.loadSourceFileInternal(path, content, sourceOrigin, null);
});
}
readSourceFile(sourcePath) {
this.trackPath(sourcePath);
return this.fs.readFile(sourcePath);
}
readRawSourceMap(mapPath) {
this.trackPath(mapPath);
return JSON.parse(this.fs.readFile(mapPath));
}
trackPath(path) {
if (this.currentPaths.includes(path)) {
throw new Error(`Circular source file mapping dependency: ${this.currentPaths.join(" -> ")} -> ${path}`);
}
this.currentPaths.push(path);
}
getLastNonEmptyLine(contents) {
let trailingWhitespaceIndex = contents.length - 1;
while (trailingWhitespaceIndex > 0 && (contents[trailingWhitespaceIndex] === "\n" || contents[trailingWhitespaceIndex] === "\r")) {
trailingWhitespaceIndex--;
}
let lastRealLineIndex = contents.lastIndexOf("\n", trailingWhitespaceIndex - 1);
if (lastRealLineIndex === -1) {
lastRealLineIndex = 0;
}
return contents.slice(lastRealLineIndex + 1);
}
replaceSchemeWithPath(path) {
return path.replace(SCHEME_MATCHER, (_, scheme) => this.schemeMap[scheme.toLowerCase()] || "");
}
};
export {
SourceFile,
SourceFileLoader
};
/**
* @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.io/license
*/
//# sourceMappingURL=chunk-2WQIUGOU.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,208 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/api.mjs
var PerfPhase;
(function(PerfPhase2) {
PerfPhase2[PerfPhase2["Unaccounted"] = 0] = "Unaccounted";
PerfPhase2[PerfPhase2["Setup"] = 1] = "Setup";
PerfPhase2[PerfPhase2["TypeScriptProgramCreate"] = 2] = "TypeScriptProgramCreate";
PerfPhase2[PerfPhase2["Reconciliation"] = 3] = "Reconciliation";
PerfPhase2[PerfPhase2["ResourceUpdate"] = 4] = "ResourceUpdate";
PerfPhase2[PerfPhase2["TypeScriptDiagnostics"] = 5] = "TypeScriptDiagnostics";
PerfPhase2[PerfPhase2["Analysis"] = 6] = "Analysis";
PerfPhase2[PerfPhase2["Resolve"] = 7] = "Resolve";
PerfPhase2[PerfPhase2["CycleDetection"] = 8] = "CycleDetection";
PerfPhase2[PerfPhase2["TcbGeneration"] = 9] = "TcbGeneration";
PerfPhase2[PerfPhase2["TcbUpdateProgram"] = 10] = "TcbUpdateProgram";
PerfPhase2[PerfPhase2["TypeScriptEmit"] = 11] = "TypeScriptEmit";
PerfPhase2[PerfPhase2["Compile"] = 12] = "Compile";
PerfPhase2[PerfPhase2["TtcAutocompletion"] = 13] = "TtcAutocompletion";
PerfPhase2[PerfPhase2["TtcDiagnostics"] = 14] = "TtcDiagnostics";
PerfPhase2[PerfPhase2["TtcSymbol"] = 15] = "TtcSymbol";
PerfPhase2[PerfPhase2["LsReferencesAndRenames"] = 16] = "LsReferencesAndRenames";
PerfPhase2[PerfPhase2["LsQuickInfo"] = 17] = "LsQuickInfo";
PerfPhase2[PerfPhase2["LsDefinition"] = 18] = "LsDefinition";
PerfPhase2[PerfPhase2["LsCompletions"] = 19] = "LsCompletions";
PerfPhase2[PerfPhase2["LsTcb"] = 20] = "LsTcb";
PerfPhase2[PerfPhase2["LsDiagnostics"] = 21] = "LsDiagnostics";
PerfPhase2[PerfPhase2["LsComponentLocations"] = 22] = "LsComponentLocations";
PerfPhase2[PerfPhase2["LsSignatureHelp"] = 23] = "LsSignatureHelp";
PerfPhase2[PerfPhase2["OutliningSpans"] = 24] = "OutliningSpans";
PerfPhase2[PerfPhase2["LAST"] = 25] = "LAST";
PerfPhase2[PerfPhase2["LsCodeFixes"] = 26] = "LsCodeFixes";
PerfPhase2[PerfPhase2["LsCodeFixesAll"] = 27] = "LsCodeFixesAll";
})(PerfPhase || (PerfPhase = {}));
var PerfEvent;
(function(PerfEvent2) {
PerfEvent2[PerfEvent2["InputDtsFile"] = 0] = "InputDtsFile";
PerfEvent2[PerfEvent2["InputTsFile"] = 1] = "InputTsFile";
PerfEvent2[PerfEvent2["AnalyzeComponent"] = 2] = "AnalyzeComponent";
PerfEvent2[PerfEvent2["AnalyzeDirective"] = 3] = "AnalyzeDirective";
PerfEvent2[PerfEvent2["AnalyzeInjectable"] = 4] = "AnalyzeInjectable";
PerfEvent2[PerfEvent2["AnalyzeNgModule"] = 5] = "AnalyzeNgModule";
PerfEvent2[PerfEvent2["AnalyzePipe"] = 6] = "AnalyzePipe";
PerfEvent2[PerfEvent2["TraitAnalyze"] = 7] = "TraitAnalyze";
PerfEvent2[PerfEvent2["TraitReuseAnalysis"] = 8] = "TraitReuseAnalysis";
PerfEvent2[PerfEvent2["SourceFilePhysicalChange"] = 9] = "SourceFilePhysicalChange";
PerfEvent2[PerfEvent2["SourceFileLogicalChange"] = 10] = "SourceFileLogicalChange";
PerfEvent2[PerfEvent2["SourceFileReuseAnalysis"] = 11] = "SourceFileReuseAnalysis";
PerfEvent2[PerfEvent2["GenerateTcb"] = 12] = "GenerateTcb";
PerfEvent2[PerfEvent2["SkipGenerateTcbNoInline"] = 13] = "SkipGenerateTcbNoInline";
PerfEvent2[PerfEvent2["ReuseTypeCheckFile"] = 14] = "ReuseTypeCheckFile";
PerfEvent2[PerfEvent2["UpdateTypeCheckProgram"] = 15] = "UpdateTypeCheckProgram";
PerfEvent2[PerfEvent2["EmitSkipSourceFile"] = 16] = "EmitSkipSourceFile";
PerfEvent2[PerfEvent2["EmitSourceFile"] = 17] = "EmitSourceFile";
PerfEvent2[PerfEvent2["LAST"] = 18] = "LAST";
})(PerfEvent || (PerfEvent = {}));
var PerfCheckpoint;
(function(PerfCheckpoint2) {
PerfCheckpoint2[PerfCheckpoint2["Initial"] = 0] = "Initial";
PerfCheckpoint2[PerfCheckpoint2["TypeScriptProgramCreate"] = 1] = "TypeScriptProgramCreate";
PerfCheckpoint2[PerfCheckpoint2["PreAnalysis"] = 2] = "PreAnalysis";
PerfCheckpoint2[PerfCheckpoint2["Analysis"] = 3] = "Analysis";
PerfCheckpoint2[PerfCheckpoint2["Resolve"] = 4] = "Resolve";
PerfCheckpoint2[PerfCheckpoint2["TtcGeneration"] = 5] = "TtcGeneration";
PerfCheckpoint2[PerfCheckpoint2["TtcUpdateProgram"] = 6] = "TtcUpdateProgram";
PerfCheckpoint2[PerfCheckpoint2["PreEmit"] = 7] = "PreEmit";
PerfCheckpoint2[PerfCheckpoint2["Emit"] = 8] = "Emit";
PerfCheckpoint2[PerfCheckpoint2["LAST"] = 9] = "LAST";
})(PerfCheckpoint || (PerfCheckpoint = {}));
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/noop.mjs
var NoopPerfRecorder = class {
eventCount() {
}
memory() {
}
phase() {
return PerfPhase.Unaccounted;
}
inPhase(phase, fn) {
return fn();
}
reset() {
}
};
var NOOP_PERF_RECORDER = new NoopPerfRecorder();
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/clock.mjs
function mark() {
return process.hrtime();
}
function timeSinceInMicros(mark2) {
const delta = process.hrtime(mark2);
return delta[0] * 1e6 + Math.floor(delta[1] / 1e3);
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/recorder.mjs
var ActivePerfRecorder = class {
static zeroedToNow() {
return new ActivePerfRecorder(mark());
}
constructor(zeroTime) {
this.zeroTime = zeroTime;
this.currentPhase = PerfPhase.Unaccounted;
this.currentPhaseEntered = this.zeroTime;
this.counters = Array(PerfEvent.LAST).fill(0);
this.phaseTime = Array(PerfPhase.LAST).fill(0);
this.bytes = Array(PerfCheckpoint.LAST).fill(0);
this.memory(PerfCheckpoint.Initial);
}
reset() {
this.counters = Array(PerfEvent.LAST).fill(0);
this.phaseTime = Array(PerfPhase.LAST).fill(0);
this.bytes = Array(PerfCheckpoint.LAST).fill(0);
this.zeroTime = mark();
this.currentPhase = PerfPhase.Unaccounted;
this.currentPhaseEntered = this.zeroTime;
}
memory(after) {
this.bytes[after] = process.memoryUsage().heapUsed;
}
phase(phase) {
const previous = this.currentPhase;
this.phaseTime[this.currentPhase] += timeSinceInMicros(this.currentPhaseEntered);
this.currentPhase = phase;
this.currentPhaseEntered = mark();
return previous;
}
inPhase(phase, fn) {
const previousPhase = this.phase(phase);
try {
return fn();
} finally {
this.phase(previousPhase);
}
}
eventCount(counter, incrementBy = 1) {
this.counters[counter] += incrementBy;
}
finalize() {
this.phase(PerfPhase.Unaccounted);
const results = {
events: {},
phases: {},
memory: {}
};
for (let i = 0; i < this.phaseTime.length; i++) {
if (this.phaseTime[i] > 0) {
results.phases[PerfPhase[i]] = this.phaseTime[i];
}
}
for (let i = 0; i < this.phaseTime.length; i++) {
if (this.counters[i] > 0) {
results.events[PerfEvent[i]] = this.counters[i];
}
}
for (let i = 0; i < this.bytes.length; i++) {
if (this.bytes[i] > 0) {
results.memory[PerfCheckpoint[i]] = this.bytes[i];
}
}
return results;
}
};
var DelegatingPerfRecorder = class {
constructor(target) {
this.target = target;
}
eventCount(counter, incrementBy) {
this.target.eventCount(counter, incrementBy);
}
phase(phase) {
return this.target.phase(phase);
}
inPhase(phase, fn) {
const previousPhase = this.target.phase(phase);
try {
return fn();
} finally {
this.target.phase(previousPhase);
}
}
memory(after) {
this.target.memory(after);
}
reset() {
this.target.reset();
}
};
export {
PerfPhase,
PerfEvent,
PerfCheckpoint,
ActivePerfRecorder,
DelegatingPerfRecorder
};
/**
* @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.io/license
*/
//# sourceMappingURL=chunk-64JBPJBS.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../packages/compiler-cli/src/ngtsc/perf/src/api.ts", "../../../../../../packages/compiler-cli/src/ngtsc/perf/src/noop.ts", "../../../../../../packages/compiler-cli/src/ngtsc/perf/src/clock.ts", "../../../../../../packages/compiler-cli/src/ngtsc/perf/src/recorder.ts"],
"mappings": "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",
"names": ["PerfPhase", "PerfEvent", "PerfCheckpoint", "mark"]
}

View file

@ -0,0 +1,62 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
var OptimizeFor;
(function(OptimizeFor2) {
OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
})(OptimizeFor || (OptimizeFor = {}));
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
var PotentialImportKind;
(function(PotentialImportKind2) {
PotentialImportKind2[PotentialImportKind2["NgModule"] = 0] = "NgModule";
PotentialImportKind2[PotentialImportKind2["Standalone"] = 1] = "Standalone";
})(PotentialImportKind || (PotentialImportKind = {}));
var PotentialImportMode;
(function(PotentialImportMode2) {
PotentialImportMode2[PotentialImportMode2["Normal"] = 0] = "Normal";
PotentialImportMode2[PotentialImportMode2["ForceDirect"] = 1] = "ForceDirect";
})(PotentialImportMode || (PotentialImportMode = {}));
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
var CompletionKind;
(function(CompletionKind2) {
CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
CompletionKind2[CompletionKind2["Variable"] = 1] = "Variable";
})(CompletionKind || (CompletionKind = {}));
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
var SymbolKind;
(function(SymbolKind2) {
SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
SymbolKind2[SymbolKind2["Output"] = 1] = "Output";
SymbolKind2[SymbolKind2["Binding"] = 2] = "Binding";
SymbolKind2[SymbolKind2["Reference"] = 3] = "Reference";
SymbolKind2[SymbolKind2["Variable"] = 4] = "Variable";
SymbolKind2[SymbolKind2["Directive"] = 5] = "Directive";
SymbolKind2[SymbolKind2["Element"] = 6] = "Element";
SymbolKind2[SymbolKind2["Template"] = 7] = "Template";
SymbolKind2[SymbolKind2["Expression"] = 8] = "Expression";
SymbolKind2[SymbolKind2["DomBinding"] = 9] = "DomBinding";
SymbolKind2[SymbolKind2["Pipe"] = 10] = "Pipe";
})(SymbolKind || (SymbolKind = {}));
export {
OptimizeFor,
CompletionKind,
PotentialImportKind,
PotentialImportMode,
SymbolKind
};
/**
* @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.io/license
*/
//# sourceMappingURL=chunk-6VEEN3ZS.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../packages/compiler-cli/src/ngtsc/typecheck/api/checker.ts", "../../../../../../packages/compiler-cli/src/ngtsc/typecheck/api/scope.ts", "../../../../../../packages/compiler-cli/src/ngtsc/typecheck/api/completion.ts", "../../../../../../packages/compiler-cli/src/ngtsc/typecheck/api/symbols.ts"],
"mappings": ";;;;;;AAuOA,IAAY;CAAZ,SAAYA,cAAW;AAQrB,EAAAA,aAAAA,aAAA,gBAAA,KAAA;AAUA,EAAAA,aAAAA,aAAA,kBAAA,KAAA;AACF,GAnBY,gBAAA,cAAW,CAAA,EAAA;;;AC1MvB,IAAY;CAAZ,SAAYC,sBAAmB;AAC7B,EAAAA,qBAAAA,qBAAA,cAAA,KAAA;AACA,EAAAA,qBAAAA,qBAAA,gBAAA,KAAA;AACF,GAHY,wBAAA,sBAAmB,CAAA,EAAA;AAmE/B,IAAY;CAAZ,SAAYC,sBAAmB;AAE7B,EAAAA,qBAAAA,qBAAA,YAAA,KAAA;AAOA,EAAAA,qBAAAA,qBAAA,iBAAA,KAAA;AACF,GAVY,wBAAA,sBAAmB,CAAA,EAAA;;;AC3E/B,IAAY;CAAZ,SAAYC,iBAAc;AACxB,EAAAA,gBAAAA,gBAAA,eAAA,KAAA;AACA,EAAAA,gBAAAA,gBAAA,cAAA,KAAA;AACF,GAHY,mBAAA,iBAAc,CAAA,EAAA;;;ACL1B,IAAY;CAAZ,SAAYC,aAAU;AACpB,EAAAA,YAAAA,YAAA,WAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,YAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,aAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,eAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,cAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,eAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,aAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,cAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,gBAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,gBAAA,KAAA;AACA,EAAAA,YAAAA,YAAA,UAAA,MAAA;AACF,GAZY,eAAA,aAAU,CAAA,EAAA;",
"names": ["OptimizeFor", "PotentialImportKind", "PotentialImportMode", "CompletionKind", "SymbolKind"]
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,345 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
DEFAULT_ERROR_CODE,
EmitFlags,
SOURCE,
createCompilerHost,
createMessageDiagnostic,
exitCodeFromResult,
formatDiagnostics,
performCompilation,
readConfiguration
} from "./chunk-ELKFSTAE.js";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/main.mjs
import ts2 from "typescript";
import yargs from "yargs";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_watch.mjs
import * as chokidar from "chokidar";
import * as path from "path";
import ts from "typescript";
function totalCompilationTimeDiagnostic(timeInMillis) {
let duration;
if (timeInMillis > 1e3) {
duration = `${(timeInMillis / 1e3).toPrecision(2)}s`;
} else {
duration = `${timeInMillis}ms`;
}
return {
category: ts.DiagnosticCategory.Message,
messageText: `Total time: ${duration}`,
code: DEFAULT_ERROR_CODE,
source: SOURCE,
file: void 0,
start: void 0,
length: void 0
};
}
var FileChangeEvent;
(function(FileChangeEvent2) {
FileChangeEvent2[FileChangeEvent2["Change"] = 0] = "Change";
FileChangeEvent2[FileChangeEvent2["CreateDelete"] = 1] = "CreateDelete";
FileChangeEvent2[FileChangeEvent2["CreateDeleteDir"] = 2] = "CreateDeleteDir";
})(FileChangeEvent || (FileChangeEvent = {}));
function createPerformWatchHost(configFileName, reportDiagnostics, existingOptions, createEmitCallback) {
return {
reportDiagnostics,
createCompilerHost: (options) => createCompilerHost({ options }),
readConfiguration: () => readConfiguration(configFileName, existingOptions),
createEmitCallback: (options) => createEmitCallback ? createEmitCallback(options) : void 0,
onFileChange: (options, listener, ready) => {
if (!options.basePath) {
reportDiagnostics([{
category: ts.DiagnosticCategory.Error,
messageText: "Invalid configuration option. baseDir not specified",
source: SOURCE,
code: DEFAULT_ERROR_CODE,
file: void 0,
start: void 0,
length: void 0
}]);
return { close: () => {
} };
}
const watcher = chokidar.watch(options.basePath, {
ignored: /((^[\/\\])\..)|(\.js$)|(\.map$)|(\.metadata\.json|node_modules)/,
ignoreInitial: true,
persistent: true
});
watcher.on("all", (event, path2) => {
switch (event) {
case "change":
listener(FileChangeEvent.Change, path2);
break;
case "unlink":
case "add":
listener(FileChangeEvent.CreateDelete, path2);
break;
case "unlinkDir":
case "addDir":
listener(FileChangeEvent.CreateDeleteDir, path2);
break;
}
});
watcher.on("ready", ready);
return { close: () => watcher.close(), ready };
},
setTimeout: ts.sys.clearTimeout && ts.sys.setTimeout || setTimeout,
clearTimeout: ts.sys.setTimeout && ts.sys.clearTimeout || clearTimeout
};
}
function performWatchCompilation(host) {
let cachedProgram;
let cachedCompilerHost;
let cachedOptions;
let timerHandleForRecompilation;
const ignoreFilesForWatch = /* @__PURE__ */ new Set();
const fileCache = /* @__PURE__ */ new Map();
const firstCompileResult = doCompilation();
let resolveReadyPromise;
const readyPromise = new Promise((resolve) => resolveReadyPromise = resolve);
const fileWatcher = host.onFileChange(cachedOptions.options, watchedFileChanged, resolveReadyPromise);
return { close, ready: (cb) => readyPromise.then(cb), firstCompileResult };
function cacheEntry(fileName) {
fileName = path.normalize(fileName);
let entry = fileCache.get(fileName);
if (!entry) {
entry = {};
fileCache.set(fileName, entry);
}
return entry;
}
function close() {
fileWatcher.close();
if (timerHandleForRecompilation) {
host.clearTimeout(timerHandleForRecompilation.timerHandle);
timerHandleForRecompilation = void 0;
}
}
function doCompilation() {
if (!cachedOptions) {
cachedOptions = host.readConfiguration();
}
if (cachedOptions.errors && cachedOptions.errors.length) {
host.reportDiagnostics(cachedOptions.errors);
return cachedOptions.errors;
}
const startTime = Date.now();
if (!cachedCompilerHost) {
cachedCompilerHost = host.createCompilerHost(cachedOptions.options);
const originalWriteFileCallback = cachedCompilerHost.writeFile;
cachedCompilerHost.writeFile = function(fileName, data, writeByteOrderMark, onError, sourceFiles = []) {
ignoreFilesForWatch.add(path.normalize(fileName));
return originalWriteFileCallback(fileName, data, writeByteOrderMark, onError, sourceFiles);
};
const originalFileExists = cachedCompilerHost.fileExists;
cachedCompilerHost.fileExists = function(fileName) {
const ce = cacheEntry(fileName);
if (ce.exists == null) {
ce.exists = originalFileExists.call(this, fileName);
}
return ce.exists;
};
const originalGetSourceFile = cachedCompilerHost.getSourceFile;
cachedCompilerHost.getSourceFile = function(fileName, languageVersion) {
const ce = cacheEntry(fileName);
if (!ce.sf) {
ce.sf = originalGetSourceFile.call(this, fileName, languageVersion);
}
return ce.sf;
};
const originalReadFile = cachedCompilerHost.readFile;
cachedCompilerHost.readFile = function(fileName) {
const ce = cacheEntry(fileName);
if (ce.content == null) {
ce.content = originalReadFile.call(this, fileName);
}
return ce.content;
};
cachedCompilerHost.getModifiedResourceFiles = function() {
if (timerHandleForRecompilation === void 0) {
return void 0;
}
return timerHandleForRecompilation.modifiedResourceFiles;
};
}
ignoreFilesForWatch.clear();
const oldProgram = cachedProgram;
cachedProgram = void 0;
const compileResult = performCompilation({
rootNames: cachedOptions.rootNames,
options: cachedOptions.options,
host: cachedCompilerHost,
oldProgram,
emitCallback: host.createEmitCallback(cachedOptions.options)
});
if (compileResult.diagnostics.length) {
host.reportDiagnostics(compileResult.diagnostics);
}
const endTime = Date.now();
if (cachedOptions.options.diagnostics) {
const totalTime = (endTime - startTime) / 1e3;
host.reportDiagnostics([totalCompilationTimeDiagnostic(endTime - startTime)]);
}
const exitCode = exitCodeFromResult(compileResult.diagnostics);
if (exitCode == 0) {
cachedProgram = compileResult.program;
host.reportDiagnostics([createMessageDiagnostic("Compilation complete. Watching for file changes.")]);
} else {
host.reportDiagnostics([createMessageDiagnostic("Compilation failed. Watching for file changes.")]);
}
return compileResult.diagnostics;
}
function resetOptions() {
cachedProgram = void 0;
cachedCompilerHost = void 0;
cachedOptions = void 0;
}
function watchedFileChanged(event, fileName) {
const normalizedPath = path.normalize(fileName);
if (cachedOptions && event === FileChangeEvent.Change && normalizedPath === path.normalize(cachedOptions.project)) {
resetOptions();
} else if (event === FileChangeEvent.CreateDelete || event === FileChangeEvent.CreateDeleteDir) {
cachedOptions = void 0;
}
if (event === FileChangeEvent.CreateDeleteDir) {
fileCache.clear();
} else {
fileCache.delete(normalizedPath);
}
if (!ignoreFilesForWatch.has(normalizedPath)) {
startTimerForRecompilation(normalizedPath);
}
}
function startTimerForRecompilation(changedPath) {
if (timerHandleForRecompilation) {
host.clearTimeout(timerHandleForRecompilation.timerHandle);
} else {
timerHandleForRecompilation = {
modifiedResourceFiles: /* @__PURE__ */ new Set(),
timerHandle: void 0
};
}
timerHandleForRecompilation.timerHandle = host.setTimeout(recompile, 250);
timerHandleForRecompilation.modifiedResourceFiles.add(changedPath);
}
function recompile() {
host.reportDiagnostics([createMessageDiagnostic("File change detected. Starting incremental compilation.")]);
doCompilation();
timerHandleForRecompilation = void 0;
}
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/main.mjs
function main(args, consoleError = console.error, config, customTransformers, programReuse, modifiedResourceFiles) {
let { project, rootNames, options, errors: configErrors, watch: watch2, emitFlags } = config || readNgcCommandLineAndConfiguration(args);
if (configErrors.length) {
return reportErrorsAndExit(configErrors, void 0, consoleError);
}
if (watch2) {
const result = watchMode(project, options, consoleError);
return reportErrorsAndExit(result.firstCompileResult, options, consoleError);
}
let oldProgram;
if (programReuse !== void 0) {
oldProgram = programReuse.program;
}
const { diagnostics: compileDiags, program } = performCompilation({ rootNames, options, emitFlags, oldProgram, customTransformers, modifiedResourceFiles });
if (programReuse !== void 0) {
programReuse.program = program;
}
return reportErrorsAndExit(compileDiags, options, consoleError);
}
function readNgcCommandLineAndConfiguration(args) {
const options = {};
const parsedArgs = yargs(args).parserConfiguration({ "strip-aliased": true }).option("i18nFile", { type: "string" }).option("i18nFormat", { type: "string" }).option("locale", { type: "string" }).option("missingTranslation", { type: "string", choices: ["error", "warning", "ignore"] }).option("outFile", { type: "string" }).option("watch", { type: "boolean", alias: ["w"] }).parseSync();
if (parsedArgs.i18nFile)
options.i18nInFile = parsedArgs.i18nFile;
if (parsedArgs.i18nFormat)
options.i18nInFormat = parsedArgs.i18nFormat;
if (parsedArgs.locale)
options.i18nInLocale = parsedArgs.locale;
if (parsedArgs.missingTranslation)
options.i18nInMissingTranslations = parsedArgs.missingTranslation;
const config = readCommandLineAndConfiguration(args, options, ["i18nFile", "i18nFormat", "locale", "missingTranslation", "watch"]);
return { ...config, watch: parsedArgs.watch };
}
function readCommandLineAndConfiguration(args, existingOptions = {}, ngCmdLineOptions = []) {
let cmdConfig = ts2.parseCommandLine(args);
const project = cmdConfig.options.project || ".";
const cmdErrors = cmdConfig.errors.filter((e) => {
if (typeof e.messageText === "string") {
const msg = e.messageText;
return !ngCmdLineOptions.some((o) => msg.indexOf(o) >= 0);
}
return true;
});
if (cmdErrors.length) {
return {
project,
rootNames: [],
options: cmdConfig.options,
errors: cmdErrors,
emitFlags: EmitFlags.Default
};
}
const config = readConfiguration(project, cmdConfig.options);
const options = { ...config.options, ...existingOptions };
if (options.locale) {
options.i18nInLocale = options.locale;
}
return {
project,
rootNames: config.rootNames,
options,
errors: config.errors,
emitFlags: config.emitFlags
};
}
function getFormatDiagnosticsHost(options) {
const basePath = options ? options.basePath : void 0;
return {
getCurrentDirectory: () => basePath || ts2.sys.getCurrentDirectory(),
getCanonicalFileName: (fileName) => fileName.replace(/\\/g, "/"),
getNewLine: () => {
if (options && options.newLine !== void 0) {
return options.newLine === ts2.NewLineKind.LineFeed ? "\n" : "\r\n";
}
return ts2.sys.newLine;
}
};
}
function reportErrorsAndExit(allDiagnostics, options, consoleError = console.error) {
const errorsAndWarnings = allDiagnostics.filter((d) => d.category !== ts2.DiagnosticCategory.Message);
printDiagnostics(errorsAndWarnings, options, consoleError);
return exitCodeFromResult(allDiagnostics);
}
function watchMode(project, options, consoleError) {
return performWatchCompilation(createPerformWatchHost(project, (diagnostics) => {
printDiagnostics(diagnostics, options, consoleError);
}, options, void 0));
}
function printDiagnostics(diagnostics, options, consoleError) {
if (diagnostics.length === 0) {
return;
}
const formatHost = getFormatDiagnosticsHost(options);
consoleError(formatDiagnostics(diagnostics, formatHost));
}
export {
main,
readCommandLineAndConfiguration
};
/**
* @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.io/license
*/
//# sourceMappingURL=chunk-H3PIRNUD.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,430 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
PartialEvaluator,
addImports,
isAngularDecorator,
tryParseSignalInputMapping
} from "./chunk-HJWHU6BO.js";
import {
ImportManager,
TypeScriptReflectionHost,
isAliasImportDeclaration,
loadIsReferencedAliasDeclarationPatch
} from "./chunk-O2GHHXCL.js";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/jit_transforms/downlevel_decorators_transform.mjs
import ts from "typescript";
function isAngularDecorator2(decorator, isCore) {
return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
}
var DECORATOR_INVOCATION_JSDOC_TYPE = "!Array<{type: !Function, args: (undefined|!Array<?>)}>";
function extractMetadataFromSingleDecorator(decorator, diagnostics) {
const metadataProperties = [];
const expr = decorator.expression;
switch (expr.kind) {
case ts.SyntaxKind.Identifier:
metadataProperties.push(ts.factory.createPropertyAssignment("type", expr));
break;
case ts.SyntaxKind.CallExpression:
const call = expr;
metadataProperties.push(ts.factory.createPropertyAssignment("type", call.expression));
if (call.arguments.length) {
const args = [];
for (const arg of call.arguments) {
args.push(arg);
}
const argsArrayLiteral = ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray(args, true));
metadataProperties.push(ts.factory.createPropertyAssignment("args", argsArrayLiteral));
}
break;
default:
diagnostics.push({
file: decorator.getSourceFile(),
start: decorator.getStart(),
length: decorator.getEnd() - decorator.getStart(),
messageText: `${ts.SyntaxKind[decorator.kind]} not implemented in gathering decorator metadata.`,
category: ts.DiagnosticCategory.Error,
code: 0
});
break;
}
return ts.factory.createObjectLiteralExpression(metadataProperties);
}
function createCtorParametersClassProperty(diagnostics, entityNameToExpression, ctorParameters, isClosureCompilerEnabled) {
const params = [];
for (const ctorParam of ctorParameters) {
if (!ctorParam.type && ctorParam.decorators.length === 0) {
params.push(ts.factory.createNull());
continue;
}
const paramType = ctorParam.type ? typeReferenceToExpression(entityNameToExpression, ctorParam.type) : void 0;
const members = [ts.factory.createPropertyAssignment("type", paramType || ts.factory.createIdentifier("undefined"))];
const decorators = [];
for (const deco of ctorParam.decorators) {
decorators.push(extractMetadataFromSingleDecorator(deco, diagnostics));
}
if (decorators.length) {
members.push(ts.factory.createPropertyAssignment("decorators", ts.factory.createArrayLiteralExpression(decorators)));
}
params.push(ts.factory.createObjectLiteralExpression(members));
}
const initializer = ts.factory.createArrowFunction(void 0, void 0, [], void 0, ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), ts.factory.createArrayLiteralExpression(params, true));
const ctorProp = ts.factory.createPropertyDeclaration([ts.factory.createToken(ts.SyntaxKind.StaticKeyword)], "ctorParameters", void 0, void 0, initializer);
if (isClosureCompilerEnabled) {
ts.setSyntheticLeadingComments(ctorProp, [
{
kind: ts.SyntaxKind.MultiLineCommentTrivia,
text: [
`*`,
` * @type {function(): !Array<(null|{`,
` * type: ?,`,
` * decorators: (undefined|${DECORATOR_INVOCATION_JSDOC_TYPE}),`,
` * })>}`,
` * @nocollapse`,
` `
].join("\n"),
pos: -1,
end: -1,
hasTrailingNewLine: true
}
]);
}
return ctorProp;
}
function typeReferenceToExpression(entityNameToExpression, node) {
let kind = node.kind;
if (ts.isLiteralTypeNode(node)) {
kind = node.literal.kind;
}
switch (kind) {
case ts.SyntaxKind.FunctionType:
case ts.SyntaxKind.ConstructorType:
return ts.factory.createIdentifier("Function");
case ts.SyntaxKind.ArrayType:
case ts.SyntaxKind.TupleType:
return ts.factory.createIdentifier("Array");
case ts.SyntaxKind.TypePredicate:
case ts.SyntaxKind.TrueKeyword:
case ts.SyntaxKind.FalseKeyword:
case ts.SyntaxKind.BooleanKeyword:
return ts.factory.createIdentifier("Boolean");
case ts.SyntaxKind.StringLiteral:
case ts.SyntaxKind.StringKeyword:
return ts.factory.createIdentifier("String");
case ts.SyntaxKind.ObjectKeyword:
return ts.factory.createIdentifier("Object");
case ts.SyntaxKind.NumberKeyword:
case ts.SyntaxKind.NumericLiteral:
return ts.factory.createIdentifier("Number");
case ts.SyntaxKind.TypeReference:
const typeRef = node;
return entityNameToExpression(typeRef.typeName);
case ts.SyntaxKind.UnionType:
const childTypeNodes = node.types.filter((t) => !(ts.isLiteralTypeNode(t) && t.literal.kind === ts.SyntaxKind.NullKeyword));
return childTypeNodes.length === 1 ? typeReferenceToExpression(entityNameToExpression, childTypeNodes[0]) : void 0;
default:
return void 0;
}
}
function symbolIsRuntimeValue(typeChecker, symbol) {
if (symbol.flags & ts.SymbolFlags.Alias) {
symbol = typeChecker.getAliasedSymbol(symbol);
}
return (symbol.flags & ts.SymbolFlags.Value & ts.SymbolFlags.ConstEnumExcludes) !== 0;
}
function getDownlevelDecoratorsTransform(typeChecker, host, diagnostics, isCore, isClosureCompilerEnabled) {
function addJSDocTypeAnnotation(node, jsdocType) {
if (!isClosureCompilerEnabled) {
return;
}
ts.setSyntheticLeadingComments(node, [
{
kind: ts.SyntaxKind.MultiLineCommentTrivia,
text: `* @type {${jsdocType}} `,
pos: -1,
end: -1,
hasTrailingNewLine: true
}
]);
}
function createPropDecoratorsClassProperty(diagnostics2, properties) {
const entries = [];
for (const [name, decorators] of properties.entries()) {
entries.push(ts.factory.createPropertyAssignment(name, ts.factory.createArrayLiteralExpression(decorators.map((deco) => extractMetadataFromSingleDecorator(deco, diagnostics2)))));
}
const initializer = ts.factory.createObjectLiteralExpression(entries, true);
const prop = ts.factory.createPropertyDeclaration([ts.factory.createToken(ts.SyntaxKind.StaticKeyword)], "propDecorators", void 0, void 0, initializer);
addJSDocTypeAnnotation(prop, `!Object<string, ${DECORATOR_INVOCATION_JSDOC_TYPE}>`);
return prop;
}
return (context) => {
const referencedParameterTypes = loadIsReferencedAliasDeclarationPatch(context);
function entityNameToExpression(name) {
const symbol = typeChecker.getSymbolAtLocation(name);
if (!symbol || !symbolIsRuntimeValue(typeChecker, symbol) || !symbol.declarations || symbol.declarations.length === 0) {
return void 0;
}
if (ts.isQualifiedName(name)) {
const containerExpr = entityNameToExpression(name.left);
if (containerExpr === void 0) {
return void 0;
}
return ts.factory.createPropertyAccessExpression(containerExpr, name.right);
}
const decl = symbol.declarations[0];
if (isAliasImportDeclaration(decl)) {
referencedParameterTypes.add(decl);
if (decl.name !== void 0) {
return ts.setOriginalNode(ts.factory.createIdentifier(decl.name.text), decl.name);
}
}
return ts.setOriginalNode(ts.factory.createIdentifier(name.text), name);
}
function transformClassElement(element) {
element = ts.visitEachChild(element, decoratorDownlevelVisitor, context);
const decoratorsToKeep = [];
const toLower = [];
const decorators = host.getDecoratorsOfDeclaration(element) || [];
for (const decorator of decorators) {
const decoratorNode = decorator.node;
if (!isAngularDecorator2(decorator, isCore)) {
decoratorsToKeep.push(decoratorNode);
continue;
}
toLower.push(decoratorNode);
}
if (!toLower.length)
return [void 0, element, []];
if (!element.name || !ts.isIdentifier(element.name)) {
diagnostics.push({
file: element.getSourceFile(),
start: element.getStart(),
length: element.getEnd() - element.getStart(),
messageText: `Cannot process decorators for class element with non-analyzable name.`,
category: ts.DiagnosticCategory.Error,
code: 0
});
return [void 0, element, []];
}
const elementModifiers = ts.canHaveModifiers(element) ? ts.getModifiers(element) : void 0;
let modifiers;
if (decoratorsToKeep.length || (elementModifiers == null ? void 0 : elementModifiers.length)) {
modifiers = ts.setTextRange(ts.factory.createNodeArray([...decoratorsToKeep, ...elementModifiers || []]), element.modifiers);
}
return [element.name.text, cloneClassElementWithModifiers(element, modifiers), toLower];
}
function transformConstructor(ctor) {
ctor = ts.visitEachChild(ctor, decoratorDownlevelVisitor, context);
const newParameters = [];
const oldParameters = ctor.parameters;
const parametersInfo = [];
for (const param of oldParameters) {
const decoratorsToKeep = [];
const paramInfo = { decorators: [], type: null };
const decorators = host.getDecoratorsOfDeclaration(param) || [];
for (const decorator of decorators) {
const decoratorNode = decorator.node;
if (!isAngularDecorator2(decorator, isCore)) {
decoratorsToKeep.push(decoratorNode);
continue;
}
paramInfo.decorators.push(decoratorNode);
}
if (param.type) {
paramInfo.type = param.type;
}
parametersInfo.push(paramInfo);
let modifiers;
const paramModifiers = ts.getModifiers(param);
if (decoratorsToKeep.length || (paramModifiers == null ? void 0 : paramModifiers.length)) {
modifiers = [...decoratorsToKeep, ...paramModifiers || []];
}
const newParam = ts.factory.updateParameterDeclaration(param, modifiers, param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer);
newParameters.push(newParam);
}
const updated = ts.factory.updateConstructorDeclaration(ctor, ts.getModifiers(ctor), newParameters, ctor.body);
return [updated, parametersInfo];
}
function transformClassDeclaration(classDecl) {
const newMembers = [];
const decoratedProperties = /* @__PURE__ */ new Map();
let classParameters = null;
for (const member of classDecl.members) {
switch (member.kind) {
case ts.SyntaxKind.PropertyDeclaration:
case ts.SyntaxKind.GetAccessor:
case ts.SyntaxKind.SetAccessor:
case ts.SyntaxKind.MethodDeclaration: {
const [name, newMember, decorators] = transformClassElement(member);
newMembers.push(newMember);
if (name)
decoratedProperties.set(name, decorators);
continue;
}
case ts.SyntaxKind.Constructor: {
const ctor = member;
if (!ctor.body)
break;
const [newMember, parametersInfo] = transformConstructor(member);
classParameters = parametersInfo;
newMembers.push(newMember);
continue;
}
default:
break;
}
newMembers.push(ts.visitEachChild(member, decoratorDownlevelVisitor, context));
}
const possibleAngularDecorators = host.getDecoratorsOfDeclaration(classDecl) || [];
const hasAngularDecorator = possibleAngularDecorators.some((d) => isAngularDecorator2(d, isCore));
if (classParameters) {
if (hasAngularDecorator || classParameters.some((p) => !!p.decorators.length)) {
newMembers.push(createCtorParametersClassProperty(diagnostics, entityNameToExpression, classParameters, isClosureCompilerEnabled));
}
}
if (decoratedProperties.size) {
newMembers.push(createPropDecoratorsClassProperty(diagnostics, decoratedProperties));
}
const members = ts.setTextRange(ts.factory.createNodeArray(newMembers, classDecl.members.hasTrailingComma), classDecl.members);
return ts.factory.updateClassDeclaration(classDecl, classDecl.modifiers, classDecl.name, classDecl.typeParameters, classDecl.heritageClauses, members);
}
function decoratorDownlevelVisitor(node) {
if (ts.isClassDeclaration(node)) {
return transformClassDeclaration(node);
}
return ts.visitEachChild(node, decoratorDownlevelVisitor, context);
}
return (sf) => {
return ts.visitEachChild(sf, decoratorDownlevelVisitor, context);
};
};
}
function cloneClassElementWithModifiers(node, modifiers) {
let clone;
if (ts.isMethodDeclaration(node)) {
clone = ts.factory.createMethodDeclaration(modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
} else if (ts.isPropertyDeclaration(node)) {
clone = ts.factory.createPropertyDeclaration(modifiers, node.name, node.questionToken, node.type, node.initializer);
} else if (ts.isGetAccessor(node)) {
clone = ts.factory.createGetAccessorDeclaration(modifiers, node.name, node.parameters, node.type, node.body);
} else if (ts.isSetAccessor(node)) {
clone = ts.factory.createSetAccessorDeclaration(modifiers, node.name, node.parameters, node.body);
} else {
throw new Error(`Unsupported decorated member with kind ${ts.SyntaxKind[node.kind]}`);
}
return ts.setOriginalNode(clone, node);
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/jit_transforms/signal_inputs_metadata_transform.mjs
import ts2 from "typescript";
var decoratorsWithInputs = ["Directive", "Component"];
var coreModuleName = "@angular/core";
function getInputSignalsMetadataTransform(host, isCore) {
return (ctx) => {
return (sourceFile) => {
const importManager = new ImportManager(void 0, void 0, ctx.factory);
sourceFile = ts2.visitNode(sourceFile, createTransformVisitor(ctx, host, importManager, isCore), ts2.isSourceFile);
const newImports = importManager.getAllImports(sourceFile.fileName);
if (newImports.length > 0) {
sourceFile = addImports(ctx.factory, importManager, sourceFile);
}
return sourceFile;
};
};
}
function createTransformVisitor(ctx, host, importManager, isCore) {
const visitor = (node) => {
var _a;
if (ts2.isClassDeclaration(node) && node.name !== void 0) {
const angularDecorator = (_a = host.getDecoratorsOfDeclaration(node)) == null ? void 0 : _a.find((d) => decoratorsWithInputs.some((name) => isAngularDecorator(d, name, isCore)));
if (angularDecorator !== void 0) {
return visitClassDeclaration(ctx, host, importManager, node, angularDecorator, isCore);
}
}
return ts2.visitEachChild(node, visitor, ctx);
};
return visitor;
}
function visitClassDeclaration(ctx, host, importManager, clazz, classDecorator, isCore) {
const members = clazz.members.map((member) => {
var _a, _b, _c;
if (!ts2.isPropertyDeclaration(member)) {
return member;
}
if (!ts2.isIdentifier(member.name) && !ts2.isStringLiteralLike(member.name)) {
return member;
}
if ((_a = host.getDecoratorsOfDeclaration(member)) == null ? void 0 : _a.some((d) => isAngularDecorator(d, "Input", isCore))) {
return member;
}
const inputMapping = tryParseSignalInputMapping({ name: member.name.text, value: (_b = member.initializer) != null ? _b : null }, host, isCore ? coreModuleName : void 0);
if (inputMapping === null) {
return member;
}
const fields = {
"isSignal": ctx.factory.createTrue(),
"alias": ctx.factory.createStringLiteral(inputMapping.bindingPropertyName),
"required": inputMapping.required ? ctx.factory.createTrue() : ctx.factory.createFalse(),
"transform": ctx.factory.createIdentifier("undefined")
};
const classDecoratorIdentifier = ts2.isIdentifier(classDecorator.identifier) ? classDecorator.identifier : classDecorator.identifier.expression;
const newDecorator = ctx.factory.createDecorator(ctx.factory.createCallExpression(ctx.factory.createPropertyAccessExpression(
importManager.generateNamespaceImport(coreModuleName),
ts2.setOriginalNode(ctx.factory.createIdentifier("Input"), classDecoratorIdentifier)
), void 0, [ctx.factory.createAsExpression(
ctx.factory.createObjectLiteralExpression(Object.entries(fields).map(([name, value]) => ctx.factory.createPropertyAssignment(name, value))),
ctx.factory.createKeywordTypeNode(ts2.SyntaxKind.AnyKeyword)
)]));
return ctx.factory.updatePropertyDeclaration(member, [newDecorator, ...(_c = member.modifiers) != null ? _c : []], member.name, member.questionToken, member.type, member.initializer);
});
return ctx.factory.updateClassDeclaration(clazz, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, members);
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/private/tooling.mjs
var GLOBAL_DEFS_FOR_TERSER = {
ngDevMode: false,
ngI18nClosureMode: false
};
var GLOBAL_DEFS_FOR_TERSER_WITH_AOT = {
...GLOBAL_DEFS_FOR_TERSER,
ngJitMode: false
};
function angularJitApplicationTransform(program, isCore = false) {
const typeChecker = program.getTypeChecker();
const reflectionHost = new TypeScriptReflectionHost(typeChecker);
const evaluator = new PartialEvaluator(reflectionHost, typeChecker, null);
const downlevelDecoratorTransform = getDownlevelDecoratorsTransform(
typeChecker,
reflectionHost,
[],
isCore,
false
);
const inputSignalMetadataTransform = getInputSignalsMetadataTransform(reflectionHost, isCore);
return (ctx) => {
return (sourceFile) => {
sourceFile = inputSignalMetadataTransform(ctx)(sourceFile);
sourceFile = downlevelDecoratorTransform(ctx)(sourceFile);
return sourceFile;
};
};
}
var constructorParametersDownlevelTransform = angularJitApplicationTransform;
export {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
angularJitApplicationTransform,
constructorParametersDownlevelTransform
};
/**
* @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.io/license
*/
//# sourceMappingURL=chunk-JJ5HCA72.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,56 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/logger.mjs
var LogLevel;
(function(LogLevel2) {
LogLevel2[LogLevel2["debug"] = 0] = "debug";
LogLevel2[LogLevel2["info"] = 1] = "info";
LogLevel2[LogLevel2["warn"] = 2] = "warn";
LogLevel2[LogLevel2["error"] = 3] = "error";
})(LogLevel || (LogLevel = {}));
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/console_logger.mjs
var RESET = "\x1B[0m";
var RED = "\x1B[31m";
var YELLOW = "\x1B[33m";
var BLUE = "\x1B[36m";
var DEBUG = `${BLUE}Debug:${RESET}`;
var WARN = `${YELLOW}Warning:${RESET}`;
var ERROR = `${RED}Error:${RESET}`;
var ConsoleLogger = class {
constructor(level) {
this.level = level;
}
debug(...args) {
if (this.level <= LogLevel.debug)
console.debug(DEBUG, ...args);
}
info(...args) {
if (this.level <= LogLevel.info)
console.info(...args);
}
warn(...args) {
if (this.level <= LogLevel.warn)
console.warn(WARN, ...args);
}
error(...args) {
if (this.level <= LogLevel.error)
console.error(ERROR, ...args);
}
};
export {
LogLevel,
ConsoleLogger
};
/**
* @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.io/license
*/
//# sourceMappingURL=chunk-LYJKWJUC.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../packages/compiler-cli/src/ngtsc/logging/src/logger.ts", "../../../../../../packages/compiler-cli/src/ngtsc/logging/src/console_logger.ts"],
"mappings": ";;;;;;AAoBA,IAAY;CAAZ,SAAYA,WAAQ;AAClB,EAAAA,UAAAA,UAAA,WAAA,KAAA;AACA,EAAAA,UAAAA,UAAA,UAAA,KAAA;AACA,EAAAA,UAAAA,UAAA,UAAA,KAAA;AACA,EAAAA,UAAAA,UAAA,WAAA,KAAA;AACF,GALY,aAAA,WAAQ,CAAA,EAAA;;;ACXpB,IAAM,QAAQ;AACd,IAAM,MAAM;AACZ,IAAM,SAAS;AACf,IAAM,OAAO;AAEN,IAAM,QAAQ,GAAG,aAAa;AAC9B,IAAM,OAAO,GAAG,iBAAiB;AACjC,IAAM,QAAQ,GAAG,YAAY;AAQ9B,IAAO,gBAAP,MAAoB;EACxB,YAAmB,OAAe;AAAf,SAAA,QAAA;EAAkB;EACrC,SAAS,MAAc;AACrB,QAAI,KAAK,SAAS,SAAS;AAAO,cAAQ,MAAM,OAAO,GAAG,IAAI;EAChE;EACA,QAAQ,MAAc;AACpB,QAAI,KAAK,SAAS,SAAS;AAAM,cAAQ,KAAK,GAAG,IAAI;EACvD;EACA,QAAQ,MAAc;AACpB,QAAI,KAAK,SAAS,SAAS;AAAM,cAAQ,KAAK,MAAM,GAAG,IAAI;EAC7D;EACA,SAAS,MAAc;AACrB,QAAI,KAAK,SAAS,SAAS;AAAO,cAAQ,MAAM,OAAO,GAAG,IAAI;EAChE;;",
"names": ["LogLevel"]
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,410 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
__require
} from "./chunk-XI2RTGAL.js";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/util.mjs
var TS_DTS_JS_EXTENSION = /(?:\.d)?\.ts$|\.js$/;
function normalizeSeparators(path) {
return path.replace(/\\/g, "/");
}
function stripExtension(path) {
return path.replace(TS_DTS_JS_EXTENSION, "");
}
function getSourceFileOrError(program, fileName) {
const sf = program.getSourceFile(fileName);
if (sf === void 0) {
throw new Error(`Program does not contain "${fileName}" - available files are ${program.getSourceFiles().map((sf2) => sf2.fileName).join(", ")}`);
}
return sf;
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/invalid_file_system.mjs
var InvalidFileSystem = class {
exists(path) {
throw makeError();
}
readFile(path) {
throw makeError();
}
readFileBuffer(path) {
throw makeError();
}
writeFile(path, data, exclusive) {
throw makeError();
}
removeFile(path) {
throw makeError();
}
symlink(target, path) {
throw makeError();
}
readdir(path) {
throw makeError();
}
lstat(path) {
throw makeError();
}
stat(path) {
throw makeError();
}
pwd() {
throw makeError();
}
chdir(path) {
throw makeError();
}
extname(path) {
throw makeError();
}
copyFile(from, to) {
throw makeError();
}
moveFile(from, to) {
throw makeError();
}
ensureDir(path) {
throw makeError();
}
removeDeep(path) {
throw makeError();
}
isCaseSensitive() {
throw makeError();
}
resolve(...paths) {
throw makeError();
}
dirname(file) {
throw makeError();
}
join(basePath, ...paths) {
throw makeError();
}
isRoot(path) {
throw makeError();
}
isRooted(path) {
throw makeError();
}
relative(from, to) {
throw makeError();
}
basename(filePath, extension) {
throw makeError();
}
realpath(filePath) {
throw makeError();
}
getDefaultLibLocation() {
throw makeError();
}
normalize(path) {
throw makeError();
}
};
function makeError() {
return new Error("FileSystem has not been configured. Please call `setFileSystem()` before calling this method.");
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/helpers.mjs
var fs = new InvalidFileSystem();
function getFileSystem() {
return fs;
}
function setFileSystem(fileSystem) {
fs = fileSystem;
}
function absoluteFrom(path) {
if (!fs.isRooted(path)) {
throw new Error(`Internal Error: absoluteFrom(${path}): path is not absolute`);
}
return fs.resolve(path);
}
var ABSOLUTE_PATH = Symbol("AbsolutePath");
function absoluteFromSourceFile(sf) {
const sfWithPatch = sf;
if (sfWithPatch[ABSOLUTE_PATH] === void 0) {
sfWithPatch[ABSOLUTE_PATH] = fs.resolve(sfWithPatch.fileName);
}
return sfWithPatch[ABSOLUTE_PATH];
}
function relativeFrom(path) {
const normalized = normalizeSeparators(path);
if (fs.isRooted(normalized)) {
throw new Error(`Internal Error: relativeFrom(${path}): path is not relative`);
}
return normalized;
}
function dirname(file) {
return fs.dirname(file);
}
function join(basePath, ...paths) {
return fs.join(basePath, ...paths);
}
function resolve(basePath, ...paths) {
return fs.resolve(basePath, ...paths);
}
function isRoot(path) {
return fs.isRoot(path);
}
function isRooted(path) {
return fs.isRooted(path);
}
function relative(from, to) {
return fs.relative(from, to);
}
function basename(filePath, extension) {
return fs.basename(filePath, extension);
}
function isLocalRelativePath(relativePath) {
return !isRooted(relativePath) && !relativePath.startsWith("..");
}
function toRelativeImport(relativePath) {
return isLocalRelativePath(relativePath) ? `./${relativePath}` : relativePath;
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/compiler_host.mjs
import * as os from "os";
import ts from "typescript";
var NgtscCompilerHost = class {
constructor(fs3, options = {}) {
this.fs = fs3;
this.options = options;
}
getSourceFile(fileName, languageVersion) {
const text = this.readFile(fileName);
return text !== void 0 ? ts.createSourceFile(fileName, text, languageVersion, true) : void 0;
}
getDefaultLibFileName(options) {
return this.fs.join(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options));
}
getDefaultLibLocation() {
return this.fs.getDefaultLibLocation();
}
writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles) {
const path = absoluteFrom(fileName);
this.fs.ensureDir(this.fs.dirname(path));
this.fs.writeFile(path, data);
}
getCurrentDirectory() {
return this.fs.pwd();
}
getCanonicalFileName(fileName) {
return this.useCaseSensitiveFileNames() ? fileName : fileName.toLowerCase();
}
useCaseSensitiveFileNames() {
return this.fs.isCaseSensitive();
}
getNewLine() {
switch (this.options.newLine) {
case ts.NewLineKind.CarriageReturnLineFeed:
return "\r\n";
case ts.NewLineKind.LineFeed:
return "\n";
default:
return os.EOL;
}
}
fileExists(fileName) {
const absPath = this.fs.resolve(fileName);
return this.fs.exists(absPath) && this.fs.stat(absPath).isFile();
}
readFile(fileName) {
const absPath = this.fs.resolve(fileName);
if (!this.fileExists(absPath)) {
return void 0;
}
return this.fs.readFile(absPath);
}
realpath(path) {
return this.fs.realpath(this.fs.resolve(path));
}
};
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/logical.mjs
var LogicalProjectPath = {
relativePathBetween: function(from, to) {
const relativePath = relative(dirname(resolve(from)), resolve(to));
return toRelativeImport(relativePath);
}
};
var LogicalFileSystem = class {
constructor(rootDirs, compilerHost) {
this.compilerHost = compilerHost;
this.cache = /* @__PURE__ */ new Map();
this.rootDirs = rootDirs.concat([]).sort((a, b) => b.length - a.length);
this.canonicalRootDirs = this.rootDirs.map((dir) => this.compilerHost.getCanonicalFileName(dir));
}
logicalPathOfSf(sf) {
return this.logicalPathOfFile(absoluteFromSourceFile(sf));
}
logicalPathOfFile(physicalFile) {
if (!this.cache.has(physicalFile)) {
const canonicalFilePath = this.compilerHost.getCanonicalFileName(physicalFile);
let logicalFile = null;
for (let i = 0; i < this.rootDirs.length; i++) {
const rootDir = this.rootDirs[i];
const canonicalRootDir = this.canonicalRootDirs[i];
if (isWithinBasePath(canonicalRootDir, canonicalFilePath)) {
logicalFile = this.createLogicalProjectPath(physicalFile, rootDir);
if (logicalFile.indexOf("/node_modules/") !== -1) {
logicalFile = null;
} else {
break;
}
}
}
this.cache.set(physicalFile, logicalFile);
}
return this.cache.get(physicalFile);
}
createLogicalProjectPath(file, rootDir) {
const logicalPath = stripExtension(file.slice(rootDir.length));
return logicalPath.startsWith("/") ? logicalPath : "/" + logicalPath;
}
};
function isWithinBasePath(base, path) {
return isLocalRelativePath(relative(base, path));
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/node_js_file_system.mjs
import fs2 from "fs";
import { createRequire } from "module";
import * as p from "path";
import { fileURLToPath } from "url";
var NodeJSPathManipulation = class {
pwd() {
return this.normalize(process.cwd());
}
chdir(dir) {
process.chdir(dir);
}
resolve(...paths) {
return this.normalize(p.resolve(...paths));
}
dirname(file) {
return this.normalize(p.dirname(file));
}
join(basePath, ...paths) {
return this.normalize(p.join(basePath, ...paths));
}
isRoot(path) {
return this.dirname(path) === this.normalize(path);
}
isRooted(path) {
return p.isAbsolute(path);
}
relative(from, to) {
return this.normalize(p.relative(from, to));
}
basename(filePath, extension) {
return p.basename(filePath, extension);
}
extname(path) {
return p.extname(path);
}
normalize(path) {
return path.replace(/\\/g, "/");
}
};
var isCommonJS = typeof __filename !== "undefined";
var currentFileUrl = isCommonJS ? null : import.meta.url;
var currentFileName = isCommonJS ? __filename : fileURLToPath(currentFileUrl);
var NodeJSReadonlyFileSystem = class extends NodeJSPathManipulation {
constructor() {
super(...arguments);
this._caseSensitive = void 0;
}
isCaseSensitive() {
if (this._caseSensitive === void 0) {
this._caseSensitive = !fs2.existsSync(this.normalize(toggleCase(currentFileName)));
}
return this._caseSensitive;
}
exists(path) {
return fs2.existsSync(path);
}
readFile(path) {
return fs2.readFileSync(path, "utf8");
}
readFileBuffer(path) {
return fs2.readFileSync(path);
}
readdir(path) {
return fs2.readdirSync(path);
}
lstat(path) {
return fs2.lstatSync(path);
}
stat(path) {
return fs2.statSync(path);
}
realpath(path) {
return this.resolve(fs2.realpathSync(path));
}
getDefaultLibLocation() {
const requireFn = isCommonJS ? __require : createRequire(currentFileUrl);
return this.resolve(requireFn.resolve("typescript"), "..");
}
};
var NodeJSFileSystem = class extends NodeJSReadonlyFileSystem {
writeFile(path, data, exclusive = false) {
fs2.writeFileSync(path, data, exclusive ? { flag: "wx" } : void 0);
}
removeFile(path) {
fs2.unlinkSync(path);
}
symlink(target, path) {
fs2.symlinkSync(target, path);
}
copyFile(from, to) {
fs2.copyFileSync(from, to);
}
moveFile(from, to) {
fs2.renameSync(from, to);
}
ensureDir(path) {
fs2.mkdirSync(path, { recursive: true });
}
removeDeep(path) {
fs2.rmdirSync(path, { recursive: true });
}
};
function toggleCase(str) {
return str.replace(/\w/g, (ch) => ch.toUpperCase() === ch ? ch.toLowerCase() : ch.toUpperCase());
}
export {
stripExtension,
getSourceFileOrError,
getFileSystem,
setFileSystem,
absoluteFrom,
absoluteFromSourceFile,
relativeFrom,
dirname,
join,
resolve,
isRoot,
isRooted,
relative,
basename,
isLocalRelativePath,
toRelativeImport,
NgtscCompilerHost,
LogicalProjectPath,
LogicalFileSystem,
NodeJSFileSystem
};
/**
* @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.io/license
*/
//# sourceMappingURL=chunk-UM6JO3VZ.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,16 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined")
return require.apply(this, arguments);
throw new Error('Dynamic require of "' + x + '" is not supported');
});
export {
__require
};
//# sourceMappingURL=chunk-XI2RTGAL.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

212
my-app/node_modules/@angular/compiler-cli/bundles/index.js generated vendored Executable file
View file

@ -0,0 +1,212 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
angularJitApplicationTransform,
constructorParametersDownlevelTransform
} from "./chunk-JJ5HCA72.js";
import {
DEFAULT_ERROR_CODE,
DecoratorType,
EmitFlags,
EntryType,
MemberTags,
MemberType,
NgCompiler,
NgCompilerHost,
NgtscProgram,
PatchedProgramIncrementalBuildStrategy,
SOURCE,
TsCreateProgramDriver,
UNKNOWN_ERROR_CODE,
calcProjectFileAndBasePath,
createCompilerHost,
createProgram,
defaultGatherDiagnostics,
exitCodeFromResult,
formatDiagnostics,
freshCompilationTicket,
incrementalFromStateTicket,
isTsDiagnostic,
performCompilation,
readConfiguration,
untagAllTsFiles
} from "./chunk-ELKFSTAE.js";
import {
OptimizeFor
} from "./chunk-6VEEN3ZS.js";
import "./chunk-HJWHU6BO.js";
import "./chunk-O2GHHXCL.js";
import {
ActivePerfRecorder,
PerfPhase
} from "./chunk-64JBPJBS.js";
import {
ConsoleLogger,
LogLevel
} from "./chunk-LYJKWJUC.js";
import {
LogicalFileSystem,
LogicalProjectPath,
NgtscCompilerHost,
NodeJSFileSystem,
absoluteFrom,
absoluteFromSourceFile,
basename,
dirname,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
join,
relative,
relativeFrom,
resolve,
setFileSystem,
toRelativeImport
} from "./chunk-UM6JO3VZ.js";
import "./chunk-XI2RTGAL.js";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version.mjs
import { Version } from "@angular/compiler";
var VERSION = new Version("17.1.3");
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/tsc_plugin.mjs
var NgTscPlugin = class {
get compiler() {
if (this._compiler === null) {
throw new Error("Lifecycle error: setupCompilation() must be called first.");
}
return this._compiler;
}
constructor(ngOptions) {
this.ngOptions = ngOptions;
this.name = "ngtsc";
this.options = null;
this.host = null;
this._compiler = null;
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();
untagAllTsFiles(program);
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/k8-fastbuild/bin/packages/compiler-cli/index.mjs
setFileSystem(new NodeJSFileSystem());
export {
ConsoleLogger,
DEFAULT_ERROR_CODE,
DecoratorType,
EmitFlags,
EntryType,
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,
createProgram,
defaultGatherDiagnostics,
dirname,
exitCodeFromResult,
formatDiagnostics,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
isTsDiagnostic,
join,
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.io/license
*/
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../packages/compiler-cli/src/version.ts", "../../../../../../packages/compiler-cli/src/ngtsc/tsc_plugin.ts", "../../../../../../packages/compiler-cli/index.ts"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,SAAQ,eAAc;AAEf,IAAM,UAAU,IAAI,QAAQ,mBAAmB;;;AC+ChD,IAAO,cAAP,MAAkB;EAOtB,IAAI,WAAQ;AACV,QAAI,KAAK,cAAc,MAAM;AAC3B,YAAM,IAAI,MAAM,2DAA2D;IAC7E;AACA,WAAO,KAAK;EACd;EAEA,YAAoB,WAAa;AAAb,SAAA,YAAA;AAbpB,SAAA,OAAO;AAEC,SAAA,UAAkC;AAClC,SAAA,OAA4B;AAC5B,SAAA,YAA6B;AAUnC,kBAAc,IAAI,iBAAgB,CAAE;EACtC;EAEA,SACI,MAAmD,YACnD,SAA2B;AAI7B,SAAK,UAAU,EAAC,GAAG,KAAK,WAAW,GAAG,QAAO;AAC7C,SAAK,OAAO,eAAe,KAAK,MAAM,YAAY,KAAK,SAA0B,IAAI;AACrF,WAAO,KAAK;EACd;EAEA,iBAAiB,SAAqB,YAAuB;AA5F/D;AAsGI,UAAM,eAAe,mBAAmB,YAAW;AACnD,QAAI,KAAK,SAAS,QAAQ,KAAK,YAAY,MAAM;AAC/C,YAAM,IAAI,MAAM,wDAAwD;IAC1E;AACA,SAAK,KAAK,2BAA0B;AACpC,oBAAgB,OAAO;AACvB,UAAM,gBAAgB,IAAI,sBACtB,SAAS,KAAK,MAAM,KAAK,SAAS,KAAK,KAAK,qBAAqB;AACrE,UAAM,WAAW,IAAI,uCAAsC;AAC3D,UAAM,WAAW,eAAe,SAAY,SAAS,oBAAoB,UAAU,IAAI;AACvF,QAAI;AAEJ,UAAM,wBAAwB,oBAAI,IAAG;AACrC,QAAI,KAAK,KAAK,6BAA6B,QAAW;AACpD,iBAAW,iBAAgB,UAAK,KAAK,yBAAwB,MAAlC,YAAwC,CAAA,GAAI;AACrE,8BAAsB,IAAI,QAAQ,YAAY,CAAC;MACjD;IACF;AAEA,QAAI,eAAe,UAAa,aAAa,MAAM;AACjD,eAAS;QACL;QAAS,KAAK;QAAS;QAAU;QAAe;QAChB;QAA6B;MAAK;IACxE,OAAO;AACL,eAAS,oBAAmB,EAAG,oBAAoB,UAAU;AAC7D,eAAS,2BACL,YAAY,UAAU,SAAS,KAAK,SAAS,UAAU,eACvD,uBAAuB,cAAc,OAAO,KAAK;IACvD;AACA,SAAK,YAAY,WAAW,WAAW,QAAQ,KAAK,IAAI;AACxD,WAAO;MACL,sBAAsB,KAAK,UAAU;MACrC,eAAe,KAAK,UAAU;;EAElC;EAEA,eAAe,MAAoB;AACjC,QAAI,SAAS,QAAW;AACtB,aAAO,KAAK,SAAS,eAAc;IACrC;AACA,WAAO,KAAK,SAAS,sBAAsB,MAAM,YAAY,YAAY;EAC3E;EAEA,uBAAoB;AAClB,WAAO,KAAK,SAAS,qBAAoB;EAC3C;EAEA,iBAAc;AACZ,WAAO,KAAK,SAAS,kBAAiB;EACxC;EAEA,qBAAkB;AAGhB,SAAK,SAAS,aAAa,MAAM,UAAU,cAAc;AACzD,WAAO,KAAK,SAAS,YAAW,EAAG;EACrC;;;;ACrHF,cAAc,IAAI,iBAAgB,CAAE;",
"names": []
}

View file

@ -0,0 +1,420 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
FatalLinkerError,
FileLinker,
LinkerEnvironment,
assert,
isFatalLinkerError
} from "../../chunk-ENSQEBQC.js";
import "../../chunk-O2GHHXCL.js";
import {
ConsoleLogger,
LogLevel
} from "../../chunk-LYJKWJUC.js";
import "../../chunk-2WQIUGOU.js";
import {
NodeJSFileSystem
} from "../../chunk-UM6JO3VZ.js";
import "../../chunk-XI2RTGAL.js";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/es2015_linker_plugin.mjs
import { types as t4 } from "@babel/core";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.mjs
import { types as t } from "@babel/core";
var BabelAstFactory = class {
constructor(sourceUrl) {
this.sourceUrl = sourceUrl;
this.createArrayLiteral = t.arrayExpression;
this.createBlock = t.blockStatement;
this.createConditional = t.conditionalExpression;
this.createExpressionStatement = t.expressionStatement;
this.createIdentifier = t.identifier;
this.createIfStatement = t.ifStatement;
this.createNewExpression = t.newExpression;
this.createParenthesizedExpression = t.parenthesizedExpression;
this.createReturnStatement = t.returnStatement;
this.createThrowStatement = t.throwStatement;
this.createUnaryExpression = t.unaryExpression;
}
attachComments(statement, leadingComments) {
for (let i = leadingComments.length - 1; i >= 0; i--) {
const comment = leadingComments[i];
t.addComment(statement, "leading", comment.toString(), !comment.multiline);
}
}
createAssignment(target, value) {
assert(target, isLExpression, "must be a left hand side expression");
return t.assignmentExpression("=", target, value);
}
createBinaryExpression(leftOperand, operator, rightOperand) {
switch (operator) {
case "&&":
case "||":
case "??":
return t.logicalExpression(operator, leftOperand, rightOperand);
default:
return t.binaryExpression(operator, leftOperand, rightOperand);
}
}
createCallExpression(callee, args, pure) {
const call = t.callExpression(callee, args);
if (pure) {
t.addComment(call, "leading", " @__PURE__ ", false);
}
return call;
}
createElementAccess(expression, element) {
return t.memberExpression(expression, element, true);
}
createFunctionDeclaration(functionName, parameters, body) {
assert(body, t.isBlockStatement, "a block");
return t.functionDeclaration(t.identifier(functionName), parameters.map((param) => t.identifier(param)), body);
}
createArrowFunctionExpression(parameters, body) {
if (t.isStatement(body)) {
assert(body, t.isBlockStatement, "a block");
}
return t.arrowFunctionExpression(parameters.map((param) => t.identifier(param)), body);
}
createFunctionExpression(functionName, parameters, body) {
assert(body, t.isBlockStatement, "a block");
const name = functionName !== null ? t.identifier(functionName) : null;
return t.functionExpression(name, parameters.map((param) => t.identifier(param)), body);
}
createDynamicImport(url) {
return this.createCallExpression(t.import(), [t.stringLiteral(url)], false);
}
createLiteral(value) {
if (typeof value === "string") {
return t.stringLiteral(value);
} else if (typeof value === "number") {
return t.numericLiteral(value);
} else if (typeof value === "boolean") {
return t.booleanLiteral(value);
} else if (value === void 0) {
return t.identifier("undefined");
} else if (value === null) {
return t.nullLiteral();
} else {
throw new Error(`Invalid literal: ${value} (${typeof value})`);
}
}
createObjectLiteral(properties) {
return t.objectExpression(properties.map((prop) => {
const key = prop.quoted ? t.stringLiteral(prop.propertyName) : t.identifier(prop.propertyName);
return t.objectProperty(key, prop.value);
}));
}
createPropertyAccess(expression, propertyName) {
return t.memberExpression(expression, t.identifier(propertyName), false);
}
createTaggedTemplate(tag, template) {
const elements = template.elements.map((element, i) => this.setSourceMapRange(t.templateElement(element, i === template.elements.length - 1), element.range));
return t.taggedTemplateExpression(tag, t.templateLiteral(elements, template.expressions));
}
createTypeOfExpression(expression) {
return t.unaryExpression("typeof", expression);
}
createVariableDeclaration(variableName, initializer, type) {
return t.variableDeclaration(type, [t.variableDeclarator(t.identifier(variableName), initializer)]);
}
setSourceMapRange(node, sourceMapRange) {
if (sourceMapRange === null) {
return node;
}
node.loc = {
filename: sourceMapRange.url !== this.sourceUrl ? sourceMapRange.url : void 0,
start: {
line: sourceMapRange.start.line + 1,
column: sourceMapRange.start.column
},
end: {
line: sourceMapRange.end.line + 1,
column: sourceMapRange.end.column
}
};
node.start = sourceMapRange.start.offset;
node.end = sourceMapRange.end.offset;
return node;
}
};
function isLExpression(expr) {
return t.isLVal(expr);
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_host.mjs
import { types as t2 } from "@babel/core";
var BabelAstHost = class {
constructor() {
this.isStringLiteral = t2.isStringLiteral;
this.isNumericLiteral = t2.isNumericLiteral;
this.isArrayLiteral = t2.isArrayExpression;
this.isObjectLiteral = t2.isObjectExpression;
this.isCallExpression = t2.isCallExpression;
}
getSymbolName(node) {
if (t2.isIdentifier(node)) {
return node.name;
} else if (t2.isMemberExpression(node) && t2.isIdentifier(node.property)) {
return node.property.name;
} else {
return null;
}
}
parseStringLiteral(str) {
assert(str, t2.isStringLiteral, "a string literal");
return str.value;
}
parseNumericLiteral(num) {
assert(num, t2.isNumericLiteral, "a numeric literal");
return num.value;
}
isBooleanLiteral(bool) {
return t2.isBooleanLiteral(bool) || isMinifiedBooleanLiteral(bool);
}
parseBooleanLiteral(bool) {
if (t2.isBooleanLiteral(bool)) {
return bool.value;
} else if (isMinifiedBooleanLiteral(bool)) {
return !bool.argument.value;
} else {
throw new FatalLinkerError(bool, "Unsupported syntax, expected a boolean literal.");
}
}
isNull(node) {
return t2.isNullLiteral(node);
}
parseArrayLiteral(array) {
assert(array, t2.isArrayExpression, "an array literal");
return array.elements.map((element) => {
assert(element, isNotEmptyElement, "element in array not to be empty");
assert(element, isNotSpreadElement, "element in array not to use spread syntax");
return element;
});
}
parseObjectLiteral(obj) {
assert(obj, t2.isObjectExpression, "an object literal");
const result = /* @__PURE__ */ new Map();
for (const property of obj.properties) {
assert(property, t2.isObjectProperty, "a property assignment");
assert(property.value, t2.isExpression, "an expression");
assert(property.key, isObjectExpressionPropertyName, "a property name");
const key = t2.isIdentifier(property.key) ? property.key.name : property.key.value;
result.set(`${key}`, property.value);
}
return result;
}
isFunctionExpression(node) {
return t2.isFunction(node);
}
parseReturnValue(fn) {
assert(fn, this.isFunctionExpression, "a function");
if (!t2.isBlockStatement(fn.body)) {
return fn.body;
}
if (fn.body.body.length !== 1) {
throw new FatalLinkerError(fn.body, "Unsupported syntax, expected a function body with a single return statement.");
}
const stmt = fn.body.body[0];
assert(stmt, t2.isReturnStatement, "a function body with a single return statement");
if (stmt.argument === null || stmt.argument === void 0) {
throw new FatalLinkerError(stmt, "Unsupported syntax, expected function to return a value.");
}
return stmt.argument;
}
parseCallee(call) {
assert(call, t2.isCallExpression, "a call expression");
assert(call.callee, t2.isExpression, "an expression");
return call.callee;
}
parseArguments(call) {
assert(call, t2.isCallExpression, "a call expression");
return call.arguments.map((arg) => {
assert(arg, isNotSpreadArgument, "argument not to use spread syntax");
assert(arg, t2.isExpression, "argument to be an expression");
return arg;
});
}
getRange(node) {
if (node.loc == null || node.start == null || node.end == null) {
throw new FatalLinkerError(node, "Unable to read range for node - it is missing location information.");
}
return {
startLine: node.loc.start.line - 1,
startCol: node.loc.start.column,
startPos: node.start,
endPos: node.end
};
}
};
function isNotEmptyElement(e) {
return e !== null;
}
function isNotSpreadElement(e) {
return !t2.isSpreadElement(e);
}
function isObjectExpressionPropertyName(n) {
return t2.isIdentifier(n) || t2.isStringLiteral(n) || t2.isNumericLiteral(n);
}
function isNotSpreadArgument(arg) {
return !t2.isSpreadElement(arg);
}
function isMinifiedBooleanLiteral(node) {
return t2.isUnaryExpression(node) && node.prefix && node.operator === "!" && t2.isNumericLiteral(node.argument) && (node.argument.value === 0 || node.argument.value === 1);
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_declaration_scope.mjs
import { types as t3 } from "@babel/core";
var BabelDeclarationScope = class {
constructor(declarationScope) {
this.declarationScope = declarationScope;
}
getConstantScopeRef(expression) {
let bindingExpression = expression;
while (t3.isMemberExpression(bindingExpression)) {
bindingExpression = bindingExpression.object;
}
if (!t3.isIdentifier(bindingExpression)) {
return null;
}
const binding = this.declarationScope.getBinding(bindingExpression.name);
if (binding === void 0) {
return null;
}
const path = binding.scope.path;
if (!path.isFunctionDeclaration() && !path.isFunctionExpression() && !(path.isProgram() && path.node.sourceType === "module")) {
return null;
}
return path;
}
};
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/es2015_linker_plugin.mjs
function createEs2015LinkerPlugin({ fileSystem, logger, ...options }) {
let fileLinker = null;
return {
visitor: {
Program: {
enter(_, state) {
var _a, _b;
assertNull(fileLinker);
const file = state.file;
const filename = (_a = file.opts.filename) != null ? _a : file.opts.filenameRelative;
if (!filename) {
throw new Error("No filename (nor filenameRelative) provided by Babel. This is required for the linking of partially compiled directives and components.");
}
const sourceUrl = fileSystem.resolve((_b = file.opts.cwd) != null ? _b : ".", filename);
const linkerEnvironment = LinkerEnvironment.create(fileSystem, logger, new BabelAstHost(), new BabelAstFactory(sourceUrl), options);
fileLinker = new FileLinker(linkerEnvironment, sourceUrl, file.code);
},
exit() {
assertNotNull(fileLinker);
for (const { constantScope, statements } of fileLinker.getConstantStatements()) {
insertStatements(constantScope, statements);
}
fileLinker = null;
}
},
CallExpression(call, state) {
if (fileLinker === null) {
return;
}
try {
const calleeName = getCalleeName(call);
if (calleeName === null) {
return;
}
const args = call.node.arguments;
if (!fileLinker.isPartialDeclaration(calleeName) || !isExpressionArray(args)) {
return;
}
const declarationScope = new BabelDeclarationScope(call.scope);
const replacement = fileLinker.linkPartialDeclaration(calleeName, args, declarationScope);
call.replaceWith(replacement);
} catch (e) {
const node = isFatalLinkerError(e) ? e.node : call.node;
throw buildCodeFrameError(state.file, e.message, node);
}
}
}
};
}
function insertStatements(path, statements) {
if (path.isProgram()) {
insertIntoProgram(path, statements);
} else {
insertIntoFunction(path, statements);
}
}
function insertIntoFunction(fn, statements) {
const body = fn.get("body");
body.unshiftContainer("body", statements);
}
function insertIntoProgram(program, statements) {
const body = program.get("body");
const importStatements = body.filter((statement) => statement.isImportDeclaration());
if (importStatements.length === 0) {
program.unshiftContainer("body", statements);
} else {
importStatements[importStatements.length - 1].insertAfter(statements);
}
}
function getCalleeName(call) {
const callee = call.node.callee;
if (t4.isIdentifier(callee)) {
return callee.name;
} else if (t4.isMemberExpression(callee) && t4.isIdentifier(callee.property)) {
return callee.property.name;
} else if (t4.isMemberExpression(callee) && t4.isStringLiteral(callee.property)) {
return callee.property.value;
} else {
return null;
}
}
function isExpressionArray(nodes) {
return nodes.every((node) => t4.isExpression(node));
}
function assertNull(obj) {
if (obj !== null) {
throw new Error("BUG - expected `obj` to be null");
}
}
function assertNotNull(obj) {
if (obj === null) {
throw new Error("BUG - expected `obj` not to be null");
}
}
function buildCodeFrameError(file, message, node) {
const filename = file.opts.filename || "(unknown file)";
const error = file.hub.buildError(node, message);
return `${filename}: ${error.message}`;
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_plugin.mjs
function defaultLinkerPlugin(api, options) {
api.assertVersion(7);
return createEs2015LinkerPlugin({
...options,
fileSystem: new NodeJSFileSystem(),
logger: new ConsoleLogger(LogLevel.info)
});
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/linker/babel/index.mjs
var babel_default = defaultLinkerPlugin;
export {
createEs2015LinkerPlugin,
babel_default as default
};
/**
* @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.io/license
*/
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,27 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
DEFAULT_LINKER_OPTIONS,
FatalLinkerError,
FileLinker,
LinkerEnvironment,
assert,
isFatalLinkerError,
needsLinking
} from "../chunk-ENSQEBQC.js";
import "../chunk-O2GHHXCL.js";
import "../chunk-2WQIUGOU.js";
import "../chunk-UM6JO3VZ.js";
import "../chunk-XI2RTGAL.js";
export {
DEFAULT_LINKER_OPTIONS,
FatalLinkerError,
FileLinker,
LinkerEnvironment,
assert,
isFatalLinkerError,
needsLinking
};
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View file

@ -0,0 +1,52 @@
#!/usr/bin/env node
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/index.mjs
function stringEncaseCRLFWithFirstIndex(value, prefix, postfix, index) {
let endIndex = 0;
let returnValue = "";
do {
const gotCR = value[index - 1] === "\r";
returnValue += value.substring(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
endIndex = index + 1;
index = value.indexOf("\n", endIndex);
} while (index !== -1);
returnValue += value.substring(endIndex);
return returnValue;
}
function styleMessage(message) {
const open = "\x1B[31m\x1B[1m";
const close = "\x1B[22m\x1B[39m";
let styledMessage = message;
const lfIndex = styledMessage.indexOf("\n");
if (lfIndex !== -1) {
styledMessage = stringEncaseCRLFWithFirstIndex(styledMessage, close, open, lfIndex);
}
return open + styledMessage + close;
}
var warningMsg = `
==========================================
ALERT: As of Angular 16, "ngcc" is no longer required and not invoked during CLI builds. You are seeing this message because the current operation invoked the "ngcc" command directly. This "ngcc" invocation can be safely removed.
A common reason for this is invoking "ngcc" from a "postinstall" hook in package.json.
In Angular 17, this command will be removed. Remove this and any other invocations to prevent errors in later versions.
==========================================
`;
console.warn(styleMessage(warningMsg));
process.exit(0);
/**
* @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.io/license
*/
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../../packages/compiler-cli/ngcc/index.ts"],
"mappings": ";;;;;;;AAUA,SAAS,+BACL,OAAe,QAAgB,SAAiB,OAAa;AAC/D,MAAI,WAAW;AACf,MAAI,cAAc;AAElB,KAAG;AACD,UAAM,QAAQ,MAAM,QAAQ,OAAO;AACnC,mBAAe,MAAM,UAAU,UAAU,QAAQ,QAAQ,IAAI,KAAK,IAAI,UACjE,QAAQ,SAAS,QAAQ;AAC9B,eAAW,QAAQ;AACnB,YAAQ,MAAM,QAAQ,MAAM,QAAQ;EACtC,SAAS,UAAU;AAEnB,iBAAe,MAAM,UAAU,QAAQ;AACvC,SAAO;AACT;AAIA,SAAS,aAAa,SAAe;AAEnC,QAAM,OAAO;AACb,QAAM,QAAQ;AAEd,MAAI,gBAAgB;AACpB,QAAM,UAAU,cAAc,QAAQ,IAAI;AAC1C,MAAI,YAAY,IAAI;AAClB,oBAAgB,+BAA+B,eAAe,OAAO,MAAM,OAAO;EACpF;AAEA,SAAO,OAAO,gBAAgB;AAChC;AAEA,IAAM,aAAa;;;;;;;;;;;;;AAcnB,QAAQ,KAAK,aAAa,UAAU,CAAC;AACrC,QAAQ,KAAK,CAAC;",
"names": []
}

View file

@ -0,0 +1,19 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
PerfPhase
} from "../chunk-64JBPJBS.js";
import "../chunk-XI2RTGAL.js";
export {
PerfPhase
};
/**
* @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.io/license
*/
//# sourceMappingURL=bazel.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View file

@ -0,0 +1,67 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
ConsoleLogger,
LogLevel
} from "../chunk-LYJKWJUC.js";
import {
SourceFile,
SourceFileLoader
} from "../chunk-2WQIUGOU.js";
import {
LogicalFileSystem,
LogicalProjectPath,
NgtscCompilerHost,
NodeJSFileSystem,
absoluteFrom,
absoluteFromSourceFile,
basename,
dirname,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
join,
relative,
relativeFrom,
resolve,
setFileSystem,
toRelativeImport
} from "../chunk-UM6JO3VZ.js";
import "../chunk-XI2RTGAL.js";
export {
ConsoleLogger,
LogLevel,
LogicalFileSystem,
LogicalProjectPath,
NgtscCompilerHost,
NodeJSFileSystem,
SourceFile,
SourceFileLoader,
absoluteFrom,
absoluteFromSourceFile,
basename,
dirname,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
join,
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.io/license
*/
//# sourceMappingURL=localize.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View file

@ -0,0 +1,41 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
PotentialImportKind,
PotentialImportMode
} from "../chunk-6VEEN3ZS.js";
import {
DynamicValue,
PartialEvaluator,
StaticInterpreter,
forwardRefResolver
} from "../chunk-HJWHU6BO.js";
import {
Reference,
TypeScriptReflectionHost,
reflectObjectLiteral
} from "../chunk-O2GHHXCL.js";
import "../chunk-64JBPJBS.js";
import "../chunk-UM6JO3VZ.js";
import "../chunk-XI2RTGAL.js";
export {
DynamicValue,
PartialEvaluator,
PotentialImportKind,
PotentialImportMode,
Reference,
StaticInterpreter,
TypeScriptReflectionHost,
forwardRefResolver,
reflectObjectLiteral
};
/**
* @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.io/license
*/
//# sourceMappingURL=migrations.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View file

@ -0,0 +1,22 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
angularJitApplicationTransform,
constructorParametersDownlevelTransform
} from "../chunk-JJ5HCA72.js";
import "../chunk-HJWHU6BO.js";
import "../chunk-O2GHHXCL.js";
import "../chunk-64JBPJBS.js";
import "../chunk-UM6JO3VZ.js";
import "../chunk-XI2RTGAL.js";
export {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
angularJitApplicationTransform,
constructorParametersDownlevelTransform
};
//# sourceMappingURL=tooling.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View file

@ -0,0 +1,61 @@
#!/usr/bin/env node
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
main,
readCommandLineAndConfiguration
} from "../../chunk-H3PIRNUD.js";
import {
EmitFlags
} from "../../chunk-ELKFSTAE.js";
import "../../chunk-6VEEN3ZS.js";
import "../../chunk-HJWHU6BO.js";
import "../../chunk-O2GHHXCL.js";
import "../../chunk-64JBPJBS.js";
import {
NodeJSFileSystem,
setFileSystem
} from "../../chunk-UM6JO3VZ.js";
import "../../chunk-XI2RTGAL.js";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs
import "reflect-metadata";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/extract_i18n.mjs
import yargs from "yargs";
function mainXi18n(args2, consoleError = console.error) {
const config = readXi18nCommandLineAndConfiguration(args2);
return main(args2, consoleError, config, void 0, void 0, void 0);
}
function readXi18nCommandLineAndConfiguration(args2) {
const options = {};
const parsedArgs = yargs(args2).option("i18nFormat", { type: "string" }).option("locale", { type: "string" }).option("outFile", { type: "string" }).parseSync();
if (parsedArgs.outFile)
options.i18nOutFile = parsedArgs.outFile;
if (parsedArgs.i18nFormat)
options.i18nOutFormat = parsedArgs.i18nFormat;
if (parsedArgs.locale)
options.i18nOutLocale = parsedArgs.locale;
const config = readCommandLineAndConfiguration(args2, options, [
"outFile",
"i18nFormat",
"locale"
]);
return { ...config, emitFlags: EmitFlags.I18nBundle };
}
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs
process.title = "Angular i18n Message Extractor (ng-xi18n)";
var args = process.argv.slice(2);
setFileSystem(new NodeJSFileSystem());
process.exitCode = mainXi18n(args);
/**
* @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.io/license
*/
//# sourceMappingURL=ng_xi18n.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../../../packages/compiler-cli/src/bin/ng_xi18n.ts", "../../../../../../../../packages/compiler-cli/src/extract_i18n.ts"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAUA,OAAO;;;ACEP,OAAO,WAAW;AAMZ,SAAU,UACZA,OAAgB,eAAsC,QAAQ,OAAK;AACrE,QAAM,SAAS,qCAAqCA,KAAI;AACxD,SAAO,KAAKA,OAAM,cAAc,QAAQ,QAAW,QAAW,MAAS;AACzE;AAEA,SAAS,qCAAqCA,OAAc;AAC1D,QAAM,UAA+B,CAAA;AACrC,QAAM,aAAa,MAAMA,KAAI,EACL,OAAO,cAAc,EAAC,MAAM,SAAQ,CAAC,EACrC,OAAO,UAAU,EAAC,MAAM,SAAQ,CAAC,EACjC,OAAO,WAAW,EAAC,MAAM,SAAQ,CAAC,EAClC,UAAS;AAEjC,MAAI,WAAW;AAAS,YAAQ,cAAc,WAAW;AACzD,MAAI,WAAW;AAAY,YAAQ,gBAAgB,WAAW;AAC9D,MAAI,WAAW;AAAQ,YAAQ,gBAAgB,WAAW;AAE1D,QAAM,SAAS,gCAAgCA,OAAM,SAAS;IAC5D;IACA;IACA;GACD;AAED,SAAO,EAAC,GAAG,QAAQ,WAAe,UAAU,WAAU;AACxD;;;AD5BA,QAAQ,QAAQ;AAChB,IAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,cAAc,IAAI,iBAAgB,CAAE;AACpC,QAAQ,WAAW,UAAU,IAAI;",
"names": ["args"]
}

View file

@ -0,0 +1,39 @@
#!/usr/bin/env node
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
main
} from "../../chunk-H3PIRNUD.js";
import "../../chunk-ELKFSTAE.js";
import "../../chunk-6VEEN3ZS.js";
import "../../chunk-HJWHU6BO.js";
import "../../chunk-O2GHHXCL.js";
import "../../chunk-64JBPJBS.js";
import {
NodeJSFileSystem,
setFileSystem
} from "../../chunk-UM6JO3VZ.js";
import "../../chunk-XI2RTGAL.js";
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/bin/ngc.mjs
import "reflect-metadata";
async function runNgcComamnd() {
process.title = "Angular Compiler (ngc)";
const args = process.argv.slice(2);
setFileSystem(new NodeJSFileSystem());
process.exitCode = main(args, void 0, void 0, void 0, void 0, void 0);
}
runNgcComamnd().catch((e) => {
console.error(e);
process.exitCode = 1;
});
/**
* @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.io/license
*/
//# sourceMappingURL=ngc.js.map

View file

@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../../../packages/compiler-cli/src/bin/ngc.ts"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAUA,OAAO;AAKP,eAAe,gBAAa;AAC1B,UAAQ,QAAQ;AAChB,QAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,gBAAc,IAAI,iBAAgB,CAAE;AAEpC,UAAQ,WAAW,KAAK,MAAM,QAAW,QAAW,QAAW,QAAW,MAAS;AACrF;AAEA,cAAa,EAAG,MAAM,OAAI;AACxB,UAAQ,MAAM,CAAC;AACf,UAAQ,WAAW;AACrB,CAAC;",
"names": []
}