@rushstack/rush-sdk
Advanced tools
Comparing version 5.134.0 to 5.135.0
@@ -56,2 +56,7 @@ import type { ITerminal } from '@rushstack/terminal'; | ||
readonly cobuildLeafProjectLogOnlyAllowed: boolean; | ||
/** | ||
* If true, operations can opt into leveraging cobuilds without restoring from the build cache. | ||
* Operations will need to us the allowCobuildWithoutCache flag to opt into this behavior per phase. | ||
*/ | ||
readonly cobuildWithoutCacheAllowed: boolean; | ||
private _cobuildLockProvider; | ||
@@ -58,0 +63,0 @@ private readonly _cobuildLockProviderFactory; |
@@ -86,2 +86,8 @@ /** | ||
rushAlerts?: boolean; | ||
/** | ||
* Allow cobuilds without using the build cache to store previous execution info. When setting up | ||
* distributed builds, Rush will allow uncacheable projects to still leverage the cobuild feature. | ||
* This is useful when you want to speed up operations that can't (or shouldn't) be cached. | ||
*/ | ||
allowCobuildWithoutCache?: boolean; | ||
} | ||
@@ -88,0 +94,0 @@ /** |
@@ -50,11 +50,5 @@ import type { ITerminal } from '@rushstack/terminal'; | ||
/** | ||
* Configuration for the shard operation. All other configuration applies to the collator operation. | ||
* @deprecated Create a separate operation settings object for the shard operation settings with the name `{operationName}:shard`. | ||
*/ | ||
shardOperationSettings?: { | ||
/** | ||
* How many concurrency units this operation should take up during execution. The maximum concurrent units is | ||
* determined by the -p flag. | ||
*/ | ||
weight?: number; | ||
}; | ||
shardOperationSettings?: unknown; | ||
} | ||
@@ -119,2 +113,6 @@ /** | ||
weight?: number; | ||
/** | ||
* If true, this operation can use cobuilds for orchestration without restoring build cache entries. | ||
*/ | ||
allowCobuildWithoutCache?: boolean; | ||
} | ||
@@ -121,0 +119,0 @@ /** |
@@ -44,2 +44,3 @@ /** | ||
export { OperationStatus } from './logic/operations/OperationStatus'; | ||
export type { ILogFilePaths } from './logic/operations/ProjectLogWritable'; | ||
export { RushSession, type IRushSessionOptions, type CloudBuildCacheProviderFactory, type CobuildLockProviderFactory } from './pluginFramework/RushSession'; | ||
@@ -46,0 +47,0 @@ export { type IRushCommand, type IGlobalCommand, type IPhasedCommand, RushLifecycleHooks } from './pluginFramework/RushLifeCycle'; |
@@ -1,6 +0,5 @@ | ||
import { type ITerminal } from '@rushstack/terminal'; | ||
import { type TerminalWritable, type ITerminal } from '@rushstack/terminal'; | ||
import { CobuildLock } from '../cobuild/CobuildLock'; | ||
import { ProjectBuildCache } from '../buildCache/ProjectBuildCache'; | ||
import { type IOperationSettings } from '../../api/RushProjectConfiguration'; | ||
import { ProjectLogWritable } from './ProjectLogWritable'; | ||
import type { CobuildConfiguration } from '../../api/CobuildConfiguration'; | ||
@@ -29,3 +28,3 @@ import { DisjointSet } from '../cobuild/DisjointSet'; | ||
buildCacheTerminal: ITerminal | undefined; | ||
buildCacheProjectLogWritable: ProjectLogWritable | undefined; | ||
buildCacheTerminalWritable: TerminalWritable | undefined; | ||
periodicCallback: PeriodicCallback; | ||
@@ -52,3 +51,3 @@ cacheRestored: boolean; | ||
private _createBuildCacheTerminalAsync; | ||
private _tryGetBuildCacheProjectLogWritableAsync; | ||
private _tryGetBuildCacheTerminalWritableAsync; | ||
} | ||
@@ -55,0 +54,0 @@ export declare function clusterOperations(initialClusters: DisjointSet<Operation>, operationBuildCacheMap: Map<Operation, { |
@@ -5,2 +5,3 @@ import type { StdioSummarizer } from '@rushstack/terminal'; | ||
import type { IStopwatchResult } from '../../utilities/Stopwatch'; | ||
import type { ILogFilePaths } from './ProjectLogWritable'; | ||
/** | ||
@@ -43,2 +44,6 @@ * The `IOperationExecutionResult` interface represents the results of executing an {@link Operation}. | ||
readonly cobuildRunnerId: string | undefined; | ||
/** | ||
* The paths to the log files, if applicable. | ||
*/ | ||
readonly logFilePaths: ILogFilePaths | undefined; | ||
} | ||
@@ -45,0 +50,0 @@ /** |
@@ -10,2 +10,3 @@ import { type ITerminal, type ITerminalProvider, StdioSummarizer } from '@rushstack/terminal'; | ||
import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; | ||
import { type ILogFilePaths } from './ProjectLogWritable'; | ||
export interface IOperationExecutionRecordContext { | ||
@@ -78,2 +79,3 @@ streamCollator: StreamCollator; | ||
readonly _operationMetadataManager: OperationMetadataManager | undefined; | ||
logFilePaths: ILogFilePaths | undefined; | ||
private readonly _context; | ||
@@ -80,0 +82,0 @@ private _collatedWriter; |
import { TerminalWritable, type ITerminalChunk } from '@rushstack/terminal'; | ||
import type { CollatedTerminal } from '@rushstack/stream-collator'; | ||
import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; | ||
export interface IProjectLogWritableOptions { | ||
project: RushConfigurationProject; | ||
terminal: CollatedTerminal; | ||
logFilenameIdentifier: string; | ||
logFilePaths: ILogFilePaths; | ||
enableChunkedOutput?: boolean; | ||
} | ||
export interface ILogFileNames { | ||
textFileName: string; | ||
jsonlFileName: string; | ||
errorFileName: string; | ||
} | ||
/** | ||
* Information about the log files for an operation. | ||
* | ||
* @alpha | ||
*/ | ||
export interface ILogFilePaths { | ||
logFolderPath: string; | ||
logChunksFolderPath: string; | ||
logPath: string; | ||
logChunksPath: string; | ||
errorLogPath: string; | ||
relativeLogPath: string; | ||
relativeErrorLogPath: string; | ||
relativeLogChunksPath: string; | ||
/** | ||
* The absolute path to the folder containing the text log files. | ||
* Provided as a convenience since it is an intermediary value of producing the text log file path. | ||
*/ | ||
textFolder: string; | ||
/** | ||
* The absolute path to the folder containing the JSONL log files. | ||
* Provided as a convenience since it is an intermediary value of producing the jsonl log file path. | ||
*/ | ||
jsonlFolder: string; | ||
/** | ||
* The absolute path to the merged (interleaved stdout and stderr) text log. | ||
* ANSI escape codes have been stripped. | ||
*/ | ||
text: string; | ||
/** | ||
* The absolute path to the stderr text log. | ||
* ANSI escape codes have been stripped. | ||
*/ | ||
error: string; | ||
/** | ||
* The absolute path to the JSONL log. ANSI escape codes are left intact to be able to reproduce the console output. | ||
*/ | ||
jsonl: string; | ||
} | ||
export interface IGetLogFilePathsOptions { | ||
project: RushConfigurationProject; | ||
project: Pick<RushConfigurationProject, 'projectFolder' | 'packageName'>; | ||
logFilenameIdentifier: string; | ||
} | ||
export declare class ProjectLogWritable extends TerminalWritable { | ||
private readonly _terminal; | ||
/** | ||
* A terminal stream that writes all log chunks to a JSONL format so they can be faithfully reconstructed | ||
* during build cache restores. This is used for adding warning + error messages in cobuilds where the original | ||
* logs cannot be completely restored from the existing `all.log` and `error.log` files. | ||
* | ||
* Example output: | ||
* libraries/rush-lib/.rush/temp/operations/rush-lib._phase_build.chunks.jsonl | ||
* ``` | ||
* {"kind":"O","text":"Invoking: heft run --only build -- --clean \n"} | ||
* {"kind":"O","text":" ---- build started ---- \n"} | ||
* {"kind":"O","text":"[build:clean] Deleted 0 files and 5 folders\n"} | ||
* {"kind":"O","text":"[build:typescript] Using TypeScript version 5.4.2\n"} | ||
* {"kind":"O","text":"[build:lint] Using ESLint version 8.57.0\n"} | ||
* {"kind":"E","text":"[build:lint] Warning: libraries/rush-lib/src/logic/operations/LogChunksWritable.ts:15:7 - (@typescript-eslint/typedef) Expected test to have a type annotation.\n"} | ||
* {"kind":"E","text":"[build:lint] Warning: libraries/rush-lib/src/logic/operations/LogChunksWritable.ts:15:7 - (@typescript-eslint/no-unused-vars) 'test' is assigned a value but never used.\n"} | ||
* {"kind":"O","text":"[build:typescript] Copied 1138 folders or files and linked 0 files\n"} | ||
* {"kind":"O","text":"[build:webpack] Using Webpack version 5.82.1\n"} | ||
* {"kind":"O","text":"[build:webpack] Running Webpack compilation\n"} | ||
* {"kind":"O","text":"[build:api-extractor] Using API Extractor version 7.43.1\n"} | ||
* {"kind":"O","text":"[build:api-extractor] Analysis will use the bundled TypeScript version 5.4.2\n"} | ||
* {"kind":"O","text":"[build:copy-mock-flush-telemetry-plugin] Copied 1260 folders or files and linked 5 files\n"} | ||
* {"kind":"O","text":" ---- build finished (6.856s) ---- \n"} | ||
* {"kind":"O","text":"-------------------- Finished (6.858s) --------------------\n"} | ||
* ``` | ||
*/ | ||
export declare class JsonLFileWritable extends TerminalWritable { | ||
readonly logPath: string; | ||
private _writer; | ||
constructor(logPath: string); | ||
writeChunk(chunk: ITerminalChunk): void; | ||
protected onWriteChunk(chunk: ITerminalChunk): void; | ||
protected onClose(): void; | ||
} | ||
/** | ||
* A terminal stream that writes two text log files: one with interleaved stdout and stderr, and one with just stderr. | ||
*/ | ||
export declare class SplitLogFileWritable extends TerminalWritable { | ||
readonly logPath: string; | ||
readonly errorLogPath: string; | ||
readonly logChunksPath: string; | ||
readonly relativeLogPath: string; | ||
readonly relativeErrorLogPath: string; | ||
readonly relativeLogChunksPath: string; | ||
private _logWriter; | ||
private _errorLogWriter; | ||
/** | ||
* A new terminal stream that writes all log chunks to a JSON format so they can be faithfully reconstructed | ||
* during build cache restores. This is used for adding warning + error messages in cobuilds where the original | ||
* logs cannot be completely restored from the existing `all.log` and `error.log` files. | ||
* | ||
* Example output: | ||
* libraries/rush-lib/.rush/temp/operations/rush-lib._phase_build.chunks.jsonl | ||
* ``` | ||
* {"kind":"O","text":"Invoking: heft run --only build -- --clean \n"} | ||
* {"kind":"O","text":" ---- build started ---- \n"} | ||
* {"kind":"O","text":"[build:clean] Deleted 0 files and 5 folders\n"} | ||
* {"kind":"O","text":"[build:typescript] Using TypeScript version 5.4.2\n"} | ||
* {"kind":"O","text":"[build:lint] Using ESLint version 8.57.0\n"} | ||
* {"kind":"E","text":"[build:lint] Warning: libraries/rush-lib/src/logic/operations/LogChunksWritable.ts:15:7 - (@typescript-eslint/typedef) Expected test to have a type annotation.\n"} | ||
* {"kind":"E","text":"[build:lint] Warning: libraries/rush-lib/src/logic/operations/LogChunksWritable.ts:15:7 - (@typescript-eslint/no-unused-vars) 'test' is assigned a value but never used.\n"} | ||
* {"kind":"O","text":"[build:typescript] Copied 1138 folders or files and linked 0 files\n"} | ||
* {"kind":"O","text":"[build:webpack] Using Webpack version 5.82.1\n"} | ||
* {"kind":"O","text":"[build:webpack] Running Webpack compilation\n"} | ||
* {"kind":"O","text":"[build:api-extractor] Using API Extractor version 7.43.1\n"} | ||
* {"kind":"O","text":"[build:api-extractor] Analysis will use the bundled TypeScript version 5.4.2\n"} | ||
* {"kind":"O","text":"[build:copy-mock-flush-telemetry-plugin] Copied 1260 folders or files and linked 5 files\n"} | ||
* {"kind":"O","text":" ---- build finished (6.856s) ---- \n"} | ||
* {"kind":"O","text":"-------------------- Finished (6.858s) --------------------\n"} | ||
* ``` | ||
*/ | ||
private _chunkWriter; | ||
private _enableChunkedOutput; | ||
private constructor(); | ||
static initializeAsync({ project, terminal, logFilenameIdentifier, enableChunkedOutput }: IProjectLogWritableOptions): Promise<ProjectLogWritable>; | ||
static getLogFilePaths({ project: { projectFolder, packageName }, logFilenameIdentifier }: IGetLogFilePathsOptions): ILogFilePaths; | ||
constructor(logPath: string, errorLogPath: string); | ||
writeChunk(chunk: ITerminalChunk): void; | ||
@@ -68,2 +93,31 @@ protected onWriteChunk(chunk: ITerminalChunk): void; | ||
} | ||
/** | ||
* Initializes the project log files for a project. Produces a combined log file, an error log file, and optionally a | ||
* chunks file that can be used to reconstrct the original console output. | ||
* @param options - The options to initialize the project log files. | ||
* @returns The terminal writable stream that will write to the log files. | ||
*/ | ||
export declare function initializeProjectLogFilesAsync(options: IProjectLogWritableOptions): Promise<TerminalWritable>; | ||
/** | ||
* @internal | ||
* | ||
* @param packageName - The raw package name | ||
* @param logFilenameIdentifier - The identifier to append to the log file name (typically the phase name) | ||
* @returns The base names of the log files | ||
*/ | ||
export declare function getLogfileBaseNames(packageName: string, logFilenameIdentifier: string): ILogFileNames; | ||
/** | ||
* @internal | ||
* | ||
* @param projectFolder - The absolute path of the project folder | ||
* @returns The absolute paths of the log folders for regular and chunked logs | ||
*/ | ||
export declare function getProjectLogFolders(projectFolder: string): Pick<ILogFilePaths, 'textFolder' | 'jsonlFolder'>; | ||
/** | ||
* @internal | ||
* | ||
* @param options - The options to get the log file paths | ||
* @returns All information about log file paths for the project and log identifier | ||
*/ | ||
export declare function getProjectLogFilePaths(options: IGetLogFilePathsOptions): ILogFilePaths; | ||
//# sourceMappingURL=ProjectLogWritable.d.ts.map |
{ | ||
"name": "@rushstack/rush-sdk", | ||
"version": "5.134.0", | ||
"version": "5.135.0", | ||
"description": "An API for interacting with the Rush engine", | ||
@@ -46,9 +46,9 @@ "repository": { | ||
"webpack": "~5.82.1", | ||
"@microsoft/rush-lib": "5.135.0", | ||
"@rushstack/heft": "0.67.2", | ||
"local-node-rig": "1.0.0", | ||
"@rushstack/heft-webpack5-plugin": "0.10.11", | ||
"@microsoft/rush-lib": "5.134.0", | ||
"@rushstack/stream-collator": "4.1.67", | ||
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.66", | ||
"@rushstack/ts-command-line": "4.22.8", | ||
"@rushstack/stream-collator": "4.1.67", | ||
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.66" | ||
"local-node-rig": "1.0.0" | ||
}, | ||
@@ -55,0 +55,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
877891
17261