@moldea.ai/cli 13.0.2 → 13.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,6 +39,8 @@ The executable derives composition from its installed manifest, resolved foundat
39
39
 
40
40
  The executable performs no network requests, telemetry, repository writes, configured Git content transformations, temporary-index operations or object-writing Git commands. Repository commands use read-only Git and no-follow filesystem observations within at most three complete snapshot attempts. Help, version and usage failures skip the installation preflight. The preflight compares installed package metadata; `composition` does not create an inspection worker.
41
41
 
42
+ Managed-block comparison tolerates LF/CRLF differences, an optional final line break, empty lines immediately inside the markers, and spaces or tabs after marker comments. It preserves exact instruction text and internal whitespace; duplicate, reversed, missing, or otherwise malformed markers still produce diagnostics.
43
+
42
44
  ## Runtime support
43
45
 
44
46
  The consumer runtime range is:
@@ -2430,7 +2430,7 @@ var MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES = Object.freeze([
2430
2430
  "@moldea.ai/repository-fs"
2431
2431
  ]);
2432
2432
  var MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES = Object.freeze({
2433
- "@moldea.ai/core": "^9.0.0",
2433
+ "@moldea.ai/core": "^9.1.1",
2434
2434
  "@moldea.ai/repository": "^4.0.0",
2435
2435
  "@moldea.ai/repository-fs": "^4.0.0"
2436
2436
  });
@@ -2514,4 +2514,4 @@ var resolveInstalledMoldeaCliComposition = (input) => resolveMoldeaCliCompositio
2514
2514
  //#endregion
2515
2515
  export { createMoldeaCliOutputPage as A, formatMoldeaCliJsonInspectResult as C, MOLDEA_CLI_GIT_WORKING_TREE_SOURCE as D, createMoldeaCliOwnedError as E, MOLDEA_CLI_COMMANDS as F, decodeMoldeaCliCursor as M, encodeMoldeaCliCursor as N, parseMoldeaCliArguments as O, MoldeaCliOutputPageException as P, formatMoldeaCliJsonError as S, formatMoldeaCliJsonValidateResult as T, formatMoldeaCliHumanInspectResult as _, require_semver as a, formatMoldeaCliJsonCompositionResult as b, runGitCommand as c, createMoldeaCliInspectProjection as d, createMoldeaCliValidateProjection as f, formatMoldeaCliHumanError as g, formatMoldeaCliHumanContentResult as h, isMoldeaCliCompositionStateValid as i, calculateMoldeaCliJsonDigest as j, isRepositoryDirectoryInputValid as k, readGit as l, formatMoldeaCliHumanCompositionResult as m, resolveMoldeaCliComposition as n, MoldeaCliCompositionException as o, formatMoldeaCliHelp as p, createMoldeaCliCompositionResult as r, createGitVersionPreflight as s, resolveInstalledMoldeaCliComposition as t, createMoldeaCliDiagnosticRecord as u, formatMoldeaCliHumanScopeResult as v, formatMoldeaCliJsonScopeResult as w, formatMoldeaCliJsonContentResult as x, formatMoldeaCliHumanValidateResult as y };
2516
2516
 
2517
- //# sourceMappingURL=composition-C9TNzN2e.js.map
2517
+ //# sourceMappingURL=composition-BNE2Fn_6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"composition-C9TNzN2e.js","names":[],"sources":["../../src/command-line/constants.ts","../../src/output-page/constants.ts","../../src/output-page/exception.ts","../../src/output-page/cursor.ts","../../src/output-page/page.ts","../../src/command-line/validations.ts","../../src/command-line/parser.ts","../../src/presentation/constants.ts","../../src/presentation/errors.ts","../../src/json-output-contract/document.ts","../../src/presentation/formatters.ts","../../src/presentation/transformers.ts","../../src/git-command/constants.ts","../../src/git-command/utilities.ts","../../src/git-command/run-git-command.ts","../../src/git-version/constants.ts","../../src/git-version/preflight.ts","../../src/composition/exception.ts","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js","../../src/composition/constants.ts","../../src/composition/validations.ts","../../src/composition/transformers.ts","../../src/composition/composition.ts"],"sourcesContent":["// schema 7 command names accepted by the executable\nexport const MOLDEA_CLI_COMMANDS = {\n Composition: 'composition',\n Content: 'content',\n Inspect: 'inspect',\n Scope: 'scope',\n Validate: 'validate',\n} as const;\n\n// option names supported by the schema 7 command grammar\nexport const MOLDEA_CLI_OPTIONS = {\n Help: '--help',\n Json: '--json',\n Cursor: '--cursor',\n MaxDiagnostics: '--max-diagnostics',\n MaxEntries: '--max-entries',\n MaxCoverage: '--max-coverage',\n MaxFileBytes: '--max-file-bytes',\n MaxManifestBytes: '--max-manifest-bytes',\n MaxOutputBytes: '--max-output-bytes',\n MaxTotalBytes: '--max-total-bytes',\n NoColor: '--no-color',\n Path: '--path',\n PathsStdin: '--paths-stdin',\n Repository: '--repository',\n Version: '--version',\n} as const;\n\n// default resource bounds forwarded by later command-composition slices\nexport const DEFAULT_MOLDEA_CLI_RESOURCE_LIMITS = Object.freeze({\n maxDiagnostics: 10_000,\n maxEntries: 100_000,\n maxCoverage: 10_000,\n maxFileBytes: 8_388_608,\n maxManifestBytes: 2_097_152,\n maxTotalBytes: 134_217_728,\n});\n","// inclusive JSON output-page bounds and default transport budget\nexport const MOLDEA_CLI_MIN_OUTPUT_BYTES = 4_096;\nexport const MOLDEA_CLI_DEFAULT_OUTPUT_BYTES = 65_536;\nexport const MOLDEA_CLI_MAX_OUTPUT_BYTES = 1_048_576;\n\n// cursor format owned by CLI schema 7\nexport const MOLDEA_CLI_CURSOR_VERSION = 2 as const;\n","import type { IMoldeaCliOutputPageErrorCode } from './types.js';\n\n/** Represents a safe pagination or output-budget failure owned by the CLI. */\nexport class MoldeaCliOutputPageException extends Error {\n public readonly code: IMoldeaCliOutputPageErrorCode;\n\n /** Creates one output-page failure with a stable public code. */\n public constructor(code: IMoldeaCliOutputPageErrorCode) {\n super(code);\n this.code = code;\n this.name = 'MoldeaCliOutputPageException';\n }\n}\n","import { timingSafeEqual } from 'node:crypto';\nimport { hashValue } from 'jg-crypto';\nimport { stringifyJsonDeterministically } from 'jg-utilities';\n\nimport type { IJsonValue } from '../json-serialization/index.js';\n\nimport { MOLDEA_CLI_CURSOR_VERSION } from './constants.js';\nimport { MoldeaCliOutputPageException } from './exception.js';\nimport type {\n IMoldeaCliCursorInput,\n IMoldeaCliCursorState,\n IMoldeaCliPageCommand,\n} from './types.js';\n\ninterface IMoldeaCliCursorPayload {\n readonly command: IMoldeaCliPageCommand;\n readonly filtersDigest: string;\n readonly lastKey: string;\n readonly sourceCursor: string | null;\n readonly snapshotDigest: string;\n readonly version: typeof MOLDEA_CLI_CURSOR_VERSION;\n}\n\ninterface IMoldeaCliCursorDocument extends IMoldeaCliCursorPayload {\n readonly checksum: string;\n}\n\nconst SHA256_PATTERN = /^sha256:[0-9a-f]{64}$/u;\nconst BASE64URL_PATTERN = /^[A-Za-z0-9_-]+$/u;\nconst CURSOR_DOCUMENT_KEYS = Object.freeze([\n 'checksum',\n 'command',\n 'filtersDigest',\n 'lastKey',\n 'snapshotDigest',\n 'sourceCursor',\n 'version',\n]);\n\n/** Calculates one stable SHA-256 identifier for deterministic JSON text. */\nexport const calculateMoldeaCliJsonDigest = (value: IJsonValue): string => {\n return `sha256:${hashValue(stringifyJsonDeterministically(value, { strict: true }))}`;\n};\n\n/** Calculates the checksum for one cursor payload without its checksum field. */\nconst calculateCursorChecksum = (payload: IMoldeaCliCursorPayload): string => {\n return calculateMoldeaCliJsonDigest(payload as unknown as IJsonValue);\n};\n\n/** Compares fixed-format checksums without data-dependent early termination. */\nconst areChecksumsEqual = (left: string, right: string): boolean => {\n const leftBytes = Buffer.from(left, 'utf8');\n const rightBytes = Buffer.from(right, 'utf8');\n\n return leftBytes.length === rightBytes.length && timingSafeEqual(leftBytes, rightBytes);\n};\n\n/** Determines whether an unknown value is one strict cursor document. */\nconst isCursorDocument = (value: unknown): value is IMoldeaCliCursorDocument => {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return false;\n }\n\n const record = value as Readonly<Record<string, unknown>>;\n const keys = Object.keys(record).sort();\n\n return (\n keys.length === CURSOR_DOCUMENT_KEYS.length &&\n keys.every((key, index) => key === CURSOR_DOCUMENT_KEYS[index]) &&\n record['version'] === MOLDEA_CLI_CURSOR_VERSION &&\n (record['command'] === 'content' ||\n record['command'] === 'inspect' ||\n record['command'] === 'scope' ||\n record['command'] === 'validate') &&\n typeof record['filtersDigest'] === 'string' &&\n SHA256_PATTERN.test(record['filtersDigest']) &&\n typeof record['lastKey'] === 'string' &&\n record['lastKey'].length > 0 &&\n (record['sourceCursor'] === null || typeof record['sourceCursor'] === 'string') &&\n typeof record['snapshotDigest'] === 'string' &&\n SHA256_PATTERN.test(record['snapshotDigest']) &&\n typeof record['checksum'] === 'string' &&\n SHA256_PATTERN.test(record['checksum'])\n );\n};\n\n/** Encodes one command-, filter-, and snapshot-bound continuation cursor. */\nexport const encodeMoldeaCliCursor = (\n command: IMoldeaCliPageCommand,\n filters: IJsonValue,\n snapshotDigest: string,\n lastKey: string,\n sourceCursor: string | null = null,\n): string => {\n const payload: IMoldeaCliCursorPayload = {\n command,\n filtersDigest: calculateMoldeaCliJsonDigest(filters),\n lastKey,\n sourceCursor,\n snapshotDigest,\n version: MOLDEA_CLI_CURSOR_VERSION,\n };\n const document: IMoldeaCliCursorDocument = {\n ...payload,\n checksum: calculateCursorChecksum(payload),\n };\n\n return Buffer.from(stringifyJsonDeterministically(document, { strict: true }), 'utf8').toString(\n 'base64url',\n );\n};\n\n/**\n * Decodes and validates one opaque continuation cursor.\n * @param input The current command state and untrusted cursor.\n * @returns The validated last composite record key.\n * @throws\n * - CURSOR_INVALID: The continuation cursor is invalid for this request.\n * - CURSOR_SNAPSHOT_CHANGED: The continuation cursor belongs to a different repository snapshot.\n */\nexport const decodeMoldeaCliCursor = (input: IMoldeaCliCursorInput): IMoldeaCliCursorState => {\n let decoded: unknown;\n\n try {\n if (!BASE64URL_PATTERN.test(input.cursor)) {\n throw new TypeError('The cursor is not canonical base64url.');\n }\n\n const bytes = Buffer.from(input.cursor, 'base64url');\n\n if (bytes.toString('base64url') !== input.cursor) {\n throw new TypeError('The cursor is not canonical base64url.');\n }\n\n const text = bytes.toString('utf8');\n decoded = JSON.parse(text) as unknown;\n } catch {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n if (!isCursorDocument(decoded)) {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n const { checksum, ...payload } = decoded;\n\n if (\n !areChecksumsEqual(checksum, calculateCursorChecksum(payload)) ||\n decoded.command !== input.command ||\n decoded.filtersDigest !== calculateMoldeaCliJsonDigest(input.filters)\n ) {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n if (input.snapshotDigest !== undefined && decoded.snapshotDigest !== input.snapshotDigest) {\n throw new MoldeaCliOutputPageException('CURSOR_SNAPSHOT_CHANGED');\n }\n\n return Object.freeze({\n lastKey: decoded.lastKey,\n snapshotDigest: decoded.snapshotDigest,\n sourceCursor: decoded.sourceCursor,\n });\n};\n","import { takeWithinByteBudget } from 'jg-utilities';\n\nimport { decodeMoldeaCliCursor, encodeMoldeaCliCursor } from './cursor.js';\nimport { MoldeaCliOutputPageException } from './exception.js';\nimport type {\n IMoldeaCliOutputPage,\n IMoldeaCliOutputPageInput,\n IMoldeaCliOutputRecord,\n} from './types.js';\n\n/** Ensures records have unique keys in strict ascending order. */\nconst assertRecordOrder = (records: readonly IMoldeaCliOutputRecord[]): void => {\n for (let index = 0; index < records.length; index += 1) {\n const key = records[index]?.key;\n const previousKey = records[index - 1]?.key;\n\n if (\n key === undefined ||\n key.length === 0 ||\n (previousKey !== undefined && key <= previousKey)\n ) {\n throw new TypeError('Output records must have unique keys in ascending order.');\n }\n }\n};\n\n/**\n * Selects the largest exact serialized output page that fits its byte budget.\n * @param input Ordered records, continuation state, and an exact final-document measurement.\n * @returns A frozen record page with a snapshot-bound continuation cursor when needed.\n * @throws\n * - CURSOR_INVALID: The continuation cursor is invalid for this request.\n * - CURSOR_SNAPSHOT_CHANGED: The continuation cursor belongs to a different repository snapshot.\n * - OUTPUT_BUDGET_TOO_SMALL: The output byte budget cannot contain the next complete result.\n */\nexport const createMoldeaCliOutputPage = <TRecord extends IMoldeaCliOutputRecord>(\n input: IMoldeaCliOutputPageInput<TRecord>,\n): IMoldeaCliOutputPage<TRecord> => {\n assertRecordOrder(input.records);\n\n const cursorState =\n input.cursor === null\n ? null\n : decodeMoldeaCliCursor({\n command: input.command,\n cursor: input.cursor,\n filters: input.filters,\n snapshotDigest: input.snapshotDigest,\n });\n const startIndex =\n cursorState === null\n ? 0\n : cursorState.sourceCursor !== null\n ? 0\n : input.records.findIndex(({ key }) => key === cursorState.lastKey) + 1;\n\n if (cursorState !== null && cursorState.sourceCursor === null && startIndex === 0) {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n const emptyRecords = Object.freeze([]) as readonly TRecord[];\n const emptyPage = Object.freeze({ cursor: null, records: emptyRecords });\n\n if (startIndex === input.records.length) {\n if (input.measure(emptyPage, 2) > input.maxOutputBytes) {\n throw new MoldeaCliOutputPageException('OUTPUT_BUDGET_TOO_SMALL');\n }\n\n return emptyPage;\n }\n\n /** Creates the cursor that continues after a page ending with the record at this end index. */\n const createCursor = (record: TRecord, endIndex: number): string | null => {\n const sourceCursor = input.sourceCursorForRecord?.(record) ?? null;\n const hasMore =\n input.sourceCursorForRecord === undefined\n ? endIndex < input.records.length\n : sourceCursor !== null;\n\n return hasMore\n ? encodeMoldeaCliCursor(\n input.command,\n input.filters,\n input.snapshotDigest,\n record.key,\n sourceCursor,\n )\n : null;\n };\n\n const selectedRecords = takeWithinByteBudget(input.records.slice(startIndex), {\n maxBytes: input.maxOutputBytes,\n measurePage: (page, itemsBytes) =>\n input.measure(\n Object.freeze({\n cursor: createCursor(page[page.length - 1] as TRecord, startIndex + page.length),\n records: page,\n }),\n itemsBytes,\n ),\n });\n const lastRecord = selectedRecords[selectedRecords.length - 1];\n\n if (lastRecord === undefined) {\n throw new MoldeaCliOutputPageException('OUTPUT_BUDGET_TOO_SMALL');\n }\n\n return Object.freeze({\n cursor: createCursor(lastRecord, startIndex + selectedRecords.length),\n records: Object.freeze(selectedRecords),\n });\n};\n","import { MOLDEA_CLI_MAX_OUTPUT_BYTES, MOLDEA_CLI_MIN_OUTPUT_BYTES } from '../output-page/index.js';\n\nimport type { IMoldeaCliResourceLimits } from './types.js';\n\nconst POSITIVE_INTEGER_PATTERN = /^\\d+$/u;\n\n/**\n * Parses one strict base-10 positive safe integer option value.\n * @param input The untrusted command-line token.\n * @returns The parsed integer, or null when the token is invalid.\n */\nexport const parsePositiveSafeInteger = (input: string): number | null => {\n if (!POSITIVE_INTEGER_PATTERN.test(input)) {\n return null;\n }\n\n const parsedInteger = Number(input);\n\n return Number.isSafeInteger(parsedInteger) && parsedInteger > 0 ? parsedInteger : null;\n};\n\n/** Parses one output byte budget inside the schema 7 transport bounds. */\nexport const parseMoldeaCliOutputByteLimit = (input: string): number | null => {\n const parsed = parsePositiveSafeInteger(input);\n\n return parsed !== null &&\n parsed >= MOLDEA_CLI_MIN_OUTPUT_BYTES &&\n parsed <= MOLDEA_CLI_MAX_OUTPUT_BYTES\n ? parsed\n : null;\n};\n\n/**\n * Validates the cross-limit ordering required by the CLI composition.\n * @param limits The effective resource limits.\n * @returns Whether manifest, file, and total byte limits are consistently ordered.\n */\nexport const areMoldeaCliResourceLimitsConsistent = (limits: IMoldeaCliResourceLimits): boolean => {\n return (\n limits.maxManifestBytes <= limits.maxFileBytes && limits.maxFileBytes <= limits.maxTotalBytes\n );\n};\n\n/**\n * Determines whether one repository option is safe scalar host-path text.\n * @param input The untrusted command-line token.\n * @returns Whether the token is non-empty scalar text without NUL.\n */\nexport const isRepositoryDirectoryInputValid = (input: string): boolean => {\n return input.length > 0 && !input.includes('\\0') && input.isWellFormed();\n};\n\n/** Determines whether one opaque cursor token is bounded safe scalar text. */\nexport const isMoldeaCliCursorInputValid = (input: string): boolean => {\n return (\n input.length > 0 && input.length <= 16_384 && !input.includes('\\0') && input.isWellFormed()\n );\n};\n","import { MOLDEA_CLI_DEFAULT_OUTPUT_BYTES } from '../output-page/index.js';\n\nimport {\n DEFAULT_MOLDEA_CLI_RESOURCE_LIMITS,\n MOLDEA_CLI_COMMANDS,\n MOLDEA_CLI_OPTIONS,\n} from './constants.js';\nimport type {\n IMoldeaCliArgumentError,\n IMoldeaCliArgumentErrorCode,\n IMoldeaCliCommand,\n IMoldeaCliCommandOptions,\n IMoldeaCliParseResult,\n IMoldeaCliResourceLimits,\n} from './types.js';\nimport {\n areMoldeaCliResourceLimitsConsistent,\n isMoldeaCliCursorInputValid,\n isRepositoryDirectoryInputValid,\n parseMoldeaCliOutputByteLimit,\n parsePositiveSafeInteger,\n} from './validations.js';\n\nconst COMMAND_NAMES = new Set<IMoldeaCliCommand>(Object.values(MOLDEA_CLI_COMMANDS));\nconst RESOURCE_OPTION_FIELDS = {\n [MOLDEA_CLI_OPTIONS.MaxDiagnostics]: 'maxDiagnostics',\n [MOLDEA_CLI_OPTIONS.MaxEntries]: 'maxEntries',\n [MOLDEA_CLI_OPTIONS.MaxCoverage]: 'maxCoverage',\n [MOLDEA_CLI_OPTIONS.MaxFileBytes]: 'maxFileBytes',\n [MOLDEA_CLI_OPTIONS.MaxManifestBytes]: 'maxManifestBytes',\n [MOLDEA_CLI_OPTIONS.MaxTotalBytes]: 'maxTotalBytes',\n} as const satisfies Readonly<Record<string, keyof IMoldeaCliResourceLimits>>;\n\n// mutable construction shape frozen before the normalized invocation is returned\ntype IMutableMoldeaCliResourceLimits = {\n -readonly [Key in keyof IMoldeaCliResourceLimits]: IMoldeaCliResourceLimits[Key];\n};\n\nconst createArgumentError = (\n code: IMoldeaCliArgumentErrorCode,\n command: IMoldeaCliCommand | null,\n isJson: boolean,\n): IMoldeaCliArgumentError => ({ code, command, isJson, kind: 'error' });\n\nconst isMoldeaCliCommand = (input: string | undefined): input is IMoldeaCliCommand => {\n return input !== undefined && COMMAND_NAMES.has(input as IMoldeaCliCommand);\n};\n\n/**\n * Parses the complete schema 7 command grammar without mutating caller arguments.\n * @param commandLineArguments The process arguments after the executable path.\n * @returns A normalized command, informational request, or safe invocation error.\n */\nexport const parseMoldeaCliArguments = (\n commandLineArguments: readonly string[],\n): IMoldeaCliParseResult => {\n const isJson = commandLineArguments.includes(MOLDEA_CLI_OPTIONS.Json);\n\n if (commandLineArguments.length === 0) {\n return { command: null, kind: 'help' };\n }\n\n const firstArgument = commandLineArguments[0];\n\n if (firstArgument === MOLDEA_CLI_OPTIONS.Help) {\n return commandLineArguments.length === 1\n ? { command: null, kind: 'help' }\n : createArgumentError('INVALID_ARGUMENT', null, isJson);\n }\n\n if (firstArgument === MOLDEA_CLI_OPTIONS.Version) {\n return commandLineArguments.length === 1\n ? { kind: 'version' }\n : createArgumentError('INVALID_ARGUMENT', null, isJson);\n }\n\n const command = isMoldeaCliCommand(firstArgument) ? firstArgument : null;\n\n if (command === null) {\n return createArgumentError('INVALID_ARGUMENT', null, isJson);\n }\n\n if (commandLineArguments.length === 2 && commandLineArguments[1] === MOLDEA_CLI_OPTIONS.Help) {\n return { command, kind: 'help' };\n }\n\n const seenOptions = new Set<string>();\n const resourceLimits: IMutableMoldeaCliResourceLimits = {\n ...DEFAULT_MOLDEA_CLI_RESOURCE_LIMITS,\n };\n let isColorDisabled = false;\n let cursor: string | null = null;\n let maxOutputBytes = MOLDEA_CLI_DEFAULT_OUTPUT_BYTES;\n let path: string | null = null;\n let pathsInput: IMoldeaCliCommandOptions['pathsInput'] = 'none';\n let repositoryDirectory: string | null = null;\n\n for (let index = 1; index < commandLineArguments.length; index += 1) {\n const option = commandLineArguments[index];\n\n if (option === undefined || seenOptions.has(option)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n seenOptions.add(option);\n\n if (option === MOLDEA_CLI_OPTIONS.Json) {\n continue;\n }\n\n if (option === MOLDEA_CLI_OPTIONS.NoColor) {\n isColorDisabled = true;\n continue;\n }\n\n if (option === MOLDEA_CLI_OPTIONS.PathsStdin) {\n pathsInput = 'stdin';\n continue;\n }\n\n if (option === MOLDEA_CLI_OPTIONS.Help || option === MOLDEA_CLI_OPTIONS.Version) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n const resourceField = RESOURCE_OPTION_FIELDS[option as keyof typeof RESOURCE_OPTION_FIELDS];\n const isRepositoryOption = option === MOLDEA_CLI_OPTIONS.Repository;\n const isCursorOption = option === MOLDEA_CLI_OPTIONS.Cursor;\n const isOutputLimitOption = option === MOLDEA_CLI_OPTIONS.MaxOutputBytes;\n const isPathOption = option === MOLDEA_CLI_OPTIONS.Path;\n\n if (\n resourceField === undefined &&\n !isRepositoryOption &&\n !isCursorOption &&\n !isOutputLimitOption &&\n !isPathOption\n ) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (command === MOLDEA_CLI_COMMANDS.Composition) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n const optionValue = commandLineArguments[index + 1];\n\n if (optionValue === undefined || optionValue.startsWith('--')) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n index += 1;\n\n if (isCursorOption) {\n if (!isMoldeaCliCursorInputValid(optionValue)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n cursor = optionValue;\n continue;\n }\n\n if (isOutputLimitOption) {\n const parsedOutputLimit = parseMoldeaCliOutputByteLimit(optionValue);\n\n if (parsedOutputLimit === null) {\n return createArgumentError('RESOURCE_LIMIT_CONFIGURATION_INVALID', command, isJson);\n }\n\n maxOutputBytes = parsedOutputLimit;\n continue;\n }\n\n if (isPathOption) {\n if (!isRepositoryDirectoryInputValid(optionValue)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n path = optionValue;\n pathsInput = 'path';\n continue;\n }\n\n if (isRepositoryOption) {\n if (!isRepositoryDirectoryInputValid(optionValue)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n repositoryDirectory = optionValue;\n continue;\n }\n\n const parsedLimit = parsePositiveSafeInteger(optionValue);\n\n if (parsedLimit === null || resourceField === undefined) {\n return createArgumentError('RESOURCE_LIMIT_CONFIGURATION_INVALID', command, isJson);\n }\n\n resourceLimits[resourceField] = parsedLimit;\n }\n\n if (!areMoldeaCliResourceLimitsConsistent(resourceLimits)) {\n return createArgumentError('RESOURCE_LIMIT_CONFIGURATION_INVALID', command, isJson);\n }\n\n const isScope = command === MOLDEA_CLI_COMMANDS.Scope;\n const isContent = command === MOLDEA_CLI_COMMANDS.Content;\n const hasPathInput = path !== null;\n const hasStdinInput = seenOptions.has(MOLDEA_CLI_OPTIONS.PathsStdin);\n\n if ((hasPathInput || hasStdinInput) && !isScope && !isContent) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (isScope && hasPathInput === hasStdinInput) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (isContent && (!hasPathInput || hasStdinInput)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (isScope && seenOptions.has(MOLDEA_CLI_OPTIONS.MaxCoverage)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (\n isContent &&\n [\n MOLDEA_CLI_OPTIONS.MaxDiagnostics,\n MOLDEA_CLI_OPTIONS.MaxCoverage,\n MOLDEA_CLI_OPTIONS.MaxManifestBytes,\n ].some((option) => seenOptions.has(option))\n ) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (!isJson && (cursor !== null || seenOptions.has(MOLDEA_CLI_OPTIONS.MaxOutputBytes))) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n const options: IMoldeaCliCommandOptions = {\n cursor,\n isColorDisabled,\n isJson,\n maxOutputBytes,\n path,\n pathsInput,\n repositoryDirectory,\n resourceLimits: Object.freeze({ ...resourceLimits }),\n };\n\n return {\n invocation: Object.freeze({ command, options: Object.freeze(options) }),\n kind: 'command',\n };\n};\n","import { MOLDEA_CLI_COMMANDS } from '../command-line/index.js';\n\n// stable safe presentation contracts for errors implemented by the CLI\nexport const MOLDEA_CLI_ERROR_DEFINITIONS = Object.freeze({\n COMPOSITION_STATE_INVALID: Object.freeze({\n message: 'The installed composition state is invalid.',\n retryable: false,\n source: 'cli',\n }),\n CONTENT_INVALID: Object.freeze({\n message: 'The requested canonical asset is not valid moldea text.',\n retryable: false,\n source: 'cli',\n }),\n CONTENT_PATH_INVALID: Object.freeze({\n message: 'The content path must identify one canonical moldea text asset.',\n retryable: false,\n source: 'cli',\n }),\n CURSOR_INVALID: Object.freeze({\n message: 'The continuation cursor is invalid for this request.',\n retryable: false,\n source: 'cli',\n }),\n CURSOR_SNAPSHOT_CHANGED: Object.freeze({\n message: 'The continuation cursor belongs to a different repository snapshot.',\n retryable: true,\n source: 'cli',\n }),\n GIT_ACCESS_DENIED: Object.freeze({\n message: 'Git access was denied.',\n retryable: true,\n source: 'git',\n }),\n GIT_COMMAND_FAILED: Object.freeze({\n message: 'The Git command failed.',\n retryable: true,\n source: 'git',\n }),\n GIT_CONTENT_TRANSFORM_UNSUPPORTED: Object.freeze({\n message: 'The requested file uses an unsupported Git content transformation.',\n retryable: false,\n source: 'git',\n }),\n GIT_NOT_FOUND: Object.freeze({\n message: 'The Git executable is unavailable.',\n retryable: false,\n source: 'git',\n }),\n GIT_OPERATION_ABORTED: Object.freeze({\n message: 'The Git operation was aborted.',\n retryable: true,\n source: 'git',\n }),\n GIT_OUTPUT_INVALID: Object.freeze({\n message: 'Git returned invalid output.',\n retryable: false,\n source: 'git',\n }),\n GIT_REPOSITORY_NOT_FOUND: Object.freeze({\n message: 'The selected path is not inside a Git repository.',\n retryable: false,\n source: 'git',\n }),\n GIT_SPARSE_CHECKOUT_UNSUPPORTED: Object.freeze({\n message: 'Sparse Git checkouts are unsupported.',\n retryable: false,\n source: 'git',\n }),\n GIT_VERSION_INVALID: Object.freeze({\n message: 'The Git version output is invalid.',\n retryable: false,\n source: 'git',\n }),\n GIT_VERSION_UNSUPPORTED: Object.freeze({\n message: 'The installed Git version is unsupported.',\n retryable: false,\n source: 'git',\n }),\n GIT_WORK_TREE_REQUIRED: Object.freeze({\n message: 'A usable Git working tree is required.',\n retryable: false,\n source: 'git',\n }),\n INTERNAL_ERROR: Object.freeze({\n message: 'The command could not be completed.',\n retryable: false,\n source: 'cli',\n }),\n INVALID_ARGUMENT: Object.freeze({\n message: 'The command invocation is invalid.',\n retryable: false,\n source: 'cli',\n }),\n OUTPUT_BUDGET_TOO_SMALL: Object.freeze({\n message: 'The output byte budget cannot contain the next complete result.',\n retryable: false,\n source: 'cli',\n }),\n PATH_INPUT_INVALID: Object.freeze({\n message:\n 'The scope path input is invalid. Use leading-slash repository-logical paths and NUL-delimited UTF-8 on stdin.',\n retryable: false,\n source: 'cli',\n }),\n RESOURCE_LIMIT_CONFIGURATION_INVALID: Object.freeze({\n message: 'The resource-limit configuration is invalid.',\n retryable: false,\n source: 'cli',\n }),\n RESOURCE_LIMIT_EXCEEDED: Object.freeze({\n message: 'A resource limit was exceeded.',\n retryable: false,\n source: 'cli',\n }),\n WORKING_TREE_UNSTABLE: Object.freeze({\n message: 'The working tree did not remain stable.',\n retryable: true,\n source: 'cli',\n }),\n} as const);\n\n// source descriptor for results derived from the selected Git working tree\nexport const MOLDEA_CLI_GIT_WORKING_TREE_SOURCE = Object.freeze({\n kind: 'git-working-tree' as const,\n});\n\n// top-level help presented without repository access\nexport const MOLDEA_CLI_TOP_LEVEL_HELP = `Usage: moldea <command> [options]\n\nCommands:\n validate Validate the current moldea project.\n inspect Inspect content-free project metadata.\n scope Match changed paths to declared moldea relationships.\n content Read one canonical moldea asset explicitly.\n composition Report the installed CLI composition state.\n\nGlobal options:\n --help Show top-level help.\n --version Show the CLI version.\n\nRun \"moldea <command> --help\" for command-specific options.\n`;\n\nconst REPOSITORY_OPTIONS_HELP = ` --repository <path> Select a Git working-tree directory.\n --json Emit one machine-readable JSON result.\n --no-color Disable ANSI styling in human output.\n`;\n\nconst BASE_RESOURCE_OPTIONS_HELP = ` --max-entries <integer> Override the repository entry limit.\n --max-file-bytes <integer> Override the per-file byte limit.\n --max-total-bytes <integer> Override the total cached-byte limit.\n`;\n\nconst INSPECTION_RESOURCE_OPTIONS_HELP = `${BASE_RESOURCE_OPTIONS_HELP} --max-manifest-bytes <integer> Override the manifest byte limit.\n --max-diagnostics <integer> Override the diagnostic count limit.\n`;\n\nconst PAGINATION_OPTIONS_HELP = ` --max-output-bytes <integer> Bound JSON output from 4096 to 1048576 bytes.\n --cursor <opaque-cursor> Continue a prior JSON result page.\n`;\n\nconst COMPLETE_INSPECTION_OPTIONS_HELP = `${REPOSITORY_OPTIONS_HELP}${INSPECTION_RESOURCE_OPTIONS_HELP} --max-coverage <integer> Override the binding coverage count limit.\n${PAGINATION_OPTIONS_HELP}`;\n\nconst SCOPE_OPTIONS_HELP = `${REPOSITORY_OPTIONS_HELP}${INSPECTION_RESOURCE_OPTIONS_HELP}${PAGINATION_OPTIONS_HELP}`;\n\nconst CONTENT_OPTIONS_HELP = `${REPOSITORY_OPTIONS_HELP}${BASE_RESOURCE_OPTIONS_HELP}${PAGINATION_OPTIONS_HELP}`;\n\n// complete command-specific help keyed by the closed command set\nexport const MOLDEA_CLI_COMMAND_HELP = {\n [MOLDEA_CLI_COMMANDS.Composition]: `Usage: moldea composition [options]\n\nReport the installed CLI composition state.\n\nOptions:\n --json Emit one machine-readable JSON result.\n --no-color Disable ANSI styling in human output.\n --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Inspect]: `Usage: moldea inspect [options]\n\nInspect content-free metadata for the current moldea project.\n\nOptions:\n${COMPLETE_INSPECTION_OPTIONS_HELP} --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Scope]: `Usage: moldea scope (--path <logical-path> | --paths-stdin) [options]\n\nMatch changed repository paths to declared moldea relationships. The stdin form accepts NUL-delimited UTF-8 logical paths.\n\nOptions:\n${SCOPE_OPTIONS_HELP} --path <logical-path> Match one repository-logical path.\n --paths-stdin Read NUL-delimited paths from stdin.\n --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Content]: `Usage: moldea content --path <canonical-logical-path> [options]\n\nRead one canonical moldea text asset in bounded Unicode-safe chunks.\n\nOptions:\n${CONTENT_OPTIONS_HELP} --path <canonical-logical-path> Select exactly one canonical moldea file.\n --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Validate]: `Usage: moldea validate [options]\n\nValidate the current moldea project.\n\nOptions:\n${COMPLETE_INSPECTION_OPTIONS_HELP} --help Show this help.\n`,\n} as const;\n","import { MOLDEA_CLI_ERROR_DEFINITIONS } from './constants.js';\nimport type { IMoldeaCliError, IMoldeaCliOwnedErrorCode } from './types.js';\n\nconst EMPTY_ERROR_DETAILS = Object.freeze({});\n\n/**\n * Creates one immutable safe error from a CLI- or Git-owned definition.\n * @param code The stable executable-owned error code.\n * @param details Safe fixed details, such as the Git subcommand that failed.\n * @returns The complete safe error object.\n */\nexport const createMoldeaCliOwnedError = (\n code: IMoldeaCliOwnedErrorCode,\n details: IMoldeaCliError['details'] = EMPTY_ERROR_DETAILS,\n): IMoldeaCliError => {\n const definition = MOLDEA_CLI_ERROR_DEFINITIONS[code];\n\n return Object.freeze({\n code,\n details: Object.freeze({ ...details }),\n message: definition.message,\n path: null,\n retryable: definition.retryable,\n source: definition.source,\n });\n};\n","import { stringifyJsonDeterministically } from 'jg-utilities';\n\nimport { MOLDEA_CLI_JSON_SCHEMA_VERSION } from './constants.js';\nimport type { IMoldeaCliJsonDocumentInput, IMoldeaCliJsonEnvelope } from './types.js';\n\n/** Creates one strict schema 7 JSON envelope. */\nexport const createMoldeaCliJsonEnvelope = <TResult>(\n input: IMoldeaCliJsonDocumentInput<TResult>,\n): IMoldeaCliJsonEnvelope<TResult> =>\n Object.freeze({\n cliVersion: input.cliVersion,\n command: input.command,\n error: input.error,\n result: input.result,\n schemaVersion: MOLDEA_CLI_JSON_SCHEMA_VERSION,\n status: input.status,\n });\n\n/** Serializes one schema 7 envelope, keys in RFC 8785 order, with its trailing line feed. */\nexport const serializeMoldeaCliJsonEnvelope = <TResult>(\n input: IMoldeaCliJsonDocumentInput<TResult>,\n): string =>\n `${stringifyJsonDeterministically(createMoldeaCliJsonEnvelope(input), { strict: true })}\\n`;\n\n/** Measures the exact final UTF-8 bytes of one schema 7 JSON document. */\nexport const measureMoldeaCliJsonEnvelope = <TResult>(\n input: IMoldeaCliJsonDocumentInput<TResult>,\n): number => Buffer.byteLength(serializeMoldeaCliJsonEnvelope(input), 'utf8');\n","import type { IDiagnosticEntity, IBindingCoverageCounts } from '@moldea.ai/core';\n\nimport { MOLDEA_CLI_COMMANDS, type IMoldeaCliCommand } from '../command-line/index.js';\nimport type { IMoldeaCliCompositionResult } from '../composition/index.js';\nimport {\n MOLDEA_CLI_JSON_SCHEMA_VERSION,\n serializeMoldeaCliJsonEnvelope,\n type IMoldeaCliJsonStatus,\n} from '../json-output-contract/index.js';\nimport type { IMoldeaCliContentResult } from '../project-content/index.js';\nimport type { IMoldeaCliScopeResult } from '../project-scope/index.js';\n\nimport { MOLDEA_CLI_COMMAND_HELP, MOLDEA_CLI_TOP_LEVEL_HELP } from './constants.js';\nimport type {\n IMoldeaCliDiagnosticRecord,\n IMoldeaCliError,\n IMoldeaCliInspectResult,\n IMoldeaCliValidateResult,\n} from './types.js';\n\nconst DIAGNOSTIC_ENTITY_KEYS = [\n 'agentId',\n 'capabilityKind',\n 'capabilityId',\n 'decisionId',\n 'variableId',\n 'contextPath',\n 'integrationPath',\n] as const satisfies readonly (keyof IDiagnosticEntity)[];\n\n/** Formats one diagnostic entity in the canonical Core field order. */\nconst formatMoldeaCliHumanDiagnosticEntity = (entity: IDiagnosticEntity): string =>\n DIAGNOSTIC_ENTITY_KEYS.flatMap((key) => {\n const identifier = entity[key];\n\n return identifier === undefined ? [] : [`${key}=${identifier}`];\n }).join(', ');\n\n/** Formats one projected diagnostic without exposing omitted arbitrary details. */\nconst formatMoldeaCliHumanDiagnostic = (diagnostic: IMoldeaCliDiagnosticRecord): string => {\n const location =\n diagnostic.path === null\n ? ''\n : diagnostic.range === null\n ? ` ${diagnostic.path}`\n : ` ${diagnostic.path}:${diagnostic.range.start.line}:${diagnostic.range.start.column}`;\n const lines = [`${diagnostic.source}:${diagnostic.code}${location} ${diagnostic.message}`];\n\n if (diagnostic.pointer !== null) {\n lines.push(` pointer: ${diagnostic.pointer}`);\n }\n\n if (diagnostic.entity !== null) {\n lines.push(` entity: ${formatMoldeaCliHumanDiagnosticEntity(diagnostic.entity)}`);\n }\n\n if (diagnostic.severity === 'warning') {\n lines.push(` subject: ${diagnostic.subject}`);\n if (diagnostic.qualifier !== null) lines.push(` qualifier: ${diagnostic.qualifier}`);\n }\n\n return lines.join('\\n');\n};\n\n/** Creates shared human status lines for one completed repository command. */\nconst createMoldeaCliHumanStatusLines = (\n isValid: boolean,\n formatVersion: number | null,\n warningCount = 0,\n): string[] => {\n const status = isValid ? (warningCount > 0 ? 'valid with warnings' : 'valid') : 'invalid';\n const lines = [`The moldea project is ${status}.`];\n\n if (formatVersion !== null) {\n lines.push(`Repository format: ${formatVersion}`);\n }\n\n return lines;\n};\n\n/** Formats one count label with correct singular or plural grammar. */\nconst formatMoldeaCliHumanCount = (\n count: number,\n singularLabel: string,\n pluralLabel: string,\n): string => `${count === 1 ? singularLabel : pluralLabel}: ${count}`;\n\n/** Formats top-level or command-specific help with its required trailing line feed. */\nexport const formatMoldeaCliHelp = (command: IMoldeaCliCommand | null): string => {\n return command === null ? MOLDEA_CLI_TOP_LEVEL_HELP : MOLDEA_CLI_COMMAND_HELP[command];\n};\n\n/** Formats one safe CLI error for human stderr output. */\nexport const formatMoldeaCliHumanError = (error: IMoldeaCliError): string =>\n `${error.source}:${error.code} ${error.message}\\n`;\n\n/** Formats any strict schema 7 JSON envelope. */\nexport const formatMoldeaCliJsonResult = <TResult>(\n command: IMoldeaCliCommand | null,\n result: TResult | null,\n error: IMoldeaCliError | null,\n status: IMoldeaCliJsonStatus,\n cliVersion: string,\n): string => serializeMoldeaCliJsonEnvelope({ cliVersion, command, error, result, status });\n\n/** Formats one safe schema 7 JSON error envelope. */\nexport const formatMoldeaCliJsonError = (\n error: IMoldeaCliError,\n command: IMoldeaCliCommand | null,\n cliVersion: string,\n): string => formatMoldeaCliJsonResult(command, null, error, 'error', cliVersion);\n\n/** Formats one valid composition result for human stdout. */\nexport const formatMoldeaCliHumanCompositionResult = (\n result: IMoldeaCliCompositionResult,\n cliVersion: string,\n): string => {\n const lines = [\n 'The installed CLI composition state is valid.',\n `CLI version: ${cliVersion}`,\n `Supported Node.js: ${result.supportedNodeRange}`,\n `JSON output schema: ${MOLDEA_CLI_JSON_SCHEMA_VERSION}`,\n `Minimum Git: ${result.minimumGitVersion}`,\n `Repository formats: ${result.repositoryFormatVersions.join(', ')}`,\n 'Packages:',\n ...result.packages.map(({ name, version }) => ` ${name}: ${version}`),\n ];\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one composition result in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonCompositionResult = (\n result: IMoldeaCliCompositionResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Composition, result, null, 'valid', cliVersion);\n\n/** Describes completed checks without claiming runtime wiring. */\nconst formatCoverage = (counts: IBindingCoverageCounts): string =>\n `Coverage: ${counts.bindings} bindings, ${counts.exportsPassed} exports confirmed, ${counts.exportsFailed} exports missing, ${counts.exportsNotChecked} not checked`;\n\n/** Formats one completed validation result for human stdout. */\nexport const formatMoldeaCliHumanValidateResult = (result: IMoldeaCliValidateResult): string => {\n const lines = createMoldeaCliHumanStatusLines(\n result.valid,\n result.formatVersion,\n result.warningCount,\n );\n\n lines.push(formatCoverage(result.coverageCounts));\n\n for (const record of result.page.records) {\n if (record.kind === 'diagnostic' && !(record.severity === 'warning' && record.accepted))\n lines.push(formatMoldeaCliHumanDiagnostic(record));\n }\n\n lines.push(formatMoldeaCliHumanCount(result.diagnosticCount, 'Diagnostic', 'Diagnostics'));\n lines.push(formatMoldeaCliHumanCount(result.errorCount, 'Error', 'Errors'));\n lines.push(formatMoldeaCliHumanCount(result.warningCount, 'Warning', 'Warnings'));\n lines.push(\n `${result.acceptedWarningCount} accepted ${result.acceptedWarningCount === 1 ? 'warning' : 'warnings'}`,\n );\n\n if (result.page.cursor !== null) {\n lines.push('Additional records are available through JSON pagination.');\n }\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one validation result in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonValidateResult = (\n result: IMoldeaCliValidateResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(\n MOLDEA_CLI_COMMANDS.Validate,\n result,\n null,\n result.valid ? 'valid' : 'invalid',\n cliVersion,\n );\n\n/** Formats one completed metadata inspection for human stdout. */\nexport const formatMoldeaCliHumanInspectResult = (result: IMoldeaCliInspectResult): string => {\n const lines = createMoldeaCliHumanStatusLines(\n result.valid,\n result.formatVersion,\n result.counts.warnings,\n );\n\n lines.push(formatCoverage(result.coverageCounts));\n lines.push(\n `${result.counts.acceptedWarnings} accepted ${result.counts.acceptedWarnings === 1 ? 'warning' : 'warnings'}`,\n );\n for (const record of result.page.records)\n if (record.kind === 'diagnostic' && !(record.severity === 'warning' && record.accepted))\n lines.push(formatMoldeaCliHumanDiagnostic(record));\n\n for (const [label, count] of Object.entries(result.counts)) {\n lines.push(`${label}: ${count}`);\n }\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one metadata inspection in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonInspectResult = (\n result: IMoldeaCliInspectResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(\n MOLDEA_CLI_COMMANDS.Inspect,\n result,\n null,\n result.valid ? 'valid' : 'invalid',\n cliVersion,\n );\n\n/** Formats one changed-path scope result for human stdout. */\nexport const formatMoldeaCliHumanScopeResult = (result: IMoldeaCliScopeResult): string => {\n const lines = [\n `The moldea scope result is ${result.valid ? 'valid' : 'invalid'}.`,\n `Relevant: ${result.relevant ? 'yes' : 'no'}`,\n ...Object.entries(result.counts).map(([label, count]) => `${label}: ${count}`),\n ];\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one changed-path scope result in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonScopeResult = (\n result: IMoldeaCliScopeResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(\n MOLDEA_CLI_COMMANDS.Scope,\n result,\n null,\n result.valid ? 'valid' : 'invalid',\n cliVersion,\n );\n\n/** Formats one explicit canonical content chunk for human stdout. */\nexport const formatMoldeaCliHumanContentResult = (result: IMoldeaCliContentResult): string => {\n const lines = [\n `Path: ${result.asset.path}`,\n `Content identity: ${result.asset.contentIdentity ?? 'unavailable'}`,\n `Bytes: ${result.chunk.byteStart}-${result.chunk.byteEnd} of ${result.asset.totalBytes}`,\n result.cursor === null ? 'Cursor: none' : `Cursor: ${result.cursor}`,\n ...(result.cursor === null\n ? []\n : ['Continue this asset by passing the cursor to a JSON content request.']),\n '',\n result.chunk.content,\n ];\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one explicit canonical content chunk in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonContentResult = (\n result: IMoldeaCliContentResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Content, result, null, 'valid', cliVersion);\n","import type {\n IDiagnostic,\n IBindingCoverage,\n IProjectInspectionItem,\n IProjectInspectionPageResult,\n IProjectValidationResult,\n} from '@moldea.ai/core';\n\nimport type { IJsonValue } from '../json-serialization/index.js';\nimport { calculateMoldeaCliJsonDigest } from '../output-page/index.js';\n\nimport { MOLDEA_CLI_GIT_WORKING_TREE_SOURCE } from './constants.js';\nimport type {\n IMoldeaCliAgentRecord,\n IMoldeaCliDiagnosticRecord,\n IMoldeaCliCoverageRecord,\n IMoldeaCliInspectProjection,\n IMoldeaCliInspectProjectMetadata,\n IMoldeaCliInspectRecord,\n IMoldeaCliMetadataRecord,\n IMoldeaCliValidateProjection,\n} from './types.js';\n\n/** Rejects a Core validation result whose completion fields contradict its validity. */\nconst assertProjectValidationInvariant = (validation: IProjectValidationResult): void => {\n const observedErrorCount = validation.diagnostics.filter(\n (diagnostic) => diagnostic.severity === 'error',\n ).length;\n const isConsistent =\n Number.isSafeInteger(validation.errorCount) &&\n Number.isSafeInteger(validation.warningCount) &&\n validation.errorCount === observedErrorCount &&\n validation.acceptedWarningCount ===\n validation.diagnostics.filter(\n (diagnostic) => diagnostic.severity === 'warning' && diagnostic.accepted === true,\n ).length &&\n validation.warningCount ===\n validation.diagnostics.length - observedErrorCount - validation.acceptedWarningCount &&\n validation.diagnosticCount ===\n validation.errorCount + validation.warningCount + validation.acceptedWarningCount &&\n validation.valid === (validation.summary !== null && validation.errorCount === 0) &&\n (validation.valid || validation.errorCount > 0);\n\n if (!isConsistent) {\n throw new TypeError('The Core validation result is internally inconsistent.');\n }\n};\n\n/** Creates one stable composite record key. */\nconst createRecordKey = (kind: string, ...parts: readonly unknown[]): string =>\n JSON.stringify([kind, ...parts]);\n\n/** Projects one diagnostic without retaining arbitrary detail payloads. */\nexport const createMoldeaCliDiagnosticRecord = (\n diagnostic: IDiagnostic,\n occurrence = 0,\n): IMoldeaCliDiagnosticRecord => {\n const record = {\n code: diagnostic.code,\n group: diagnostic.group,\n entity: diagnostic.entity,\n key: createRecordKey(\n 'diagnostic',\n diagnostic.source,\n diagnostic.severity,\n diagnostic.code,\n diagnostic.path,\n diagnostic.pointer,\n diagnostic.severity === 'warning'\n ? [\n diagnostic.subject,\n diagnostic.qualifier,\n diagnostic.accepted === true,\n diagnostic.accepted === true ? diagnostic.reason : null,\n ]\n : null,\n occurrence,\n ),\n kind: 'diagnostic' as const,\n message: diagnostic.message,\n path: diagnostic.path,\n pointer: diagnostic.pointer,\n range: diagnostic.range,\n source: diagnostic.source,\n };\n\n if (diagnostic.severity === 'warning') {\n return Object.freeze({\n ...record,\n severity: 'warning' as const,\n subject: diagnostic.subject,\n qualifier: diagnostic.qualifier,\n acceptable: diagnostic.acceptable,\n accepted: diagnostic.accepted === true,\n reason: diagnostic.accepted === true ? diagnostic.reason : null,\n });\n }\n\n return Object.freeze({ ...record, severity: 'error' as const });\n};\n\n/** Projects a binding's file and export checks with a stable record key. */\nconst createCoverageRecord = (\n coverage: IBindingCoverage,\n index: number,\n order = 'coverage',\n): IMoldeaCliCoverageRecord =>\n Object.freeze({\n entity: coverage.entity,\n relationship: coverage.relationship,\n path: coverage.path,\n symbol: coverage.symbol,\n fileCheck: coverage.fileCheck,\n ...(coverage.exportCheck === 'not-checked'\n ? {\n exportCheck: coverage.exportCheck,\n exportNotCheckedReason: coverage.exportNotCheckedReason,\n }\n : { exportCheck: coverage.exportCheck }),\n key: createRecordKey(\n order,\n 'coverage',\n coverage.relationship,\n coverage.entity,\n coverage.path,\n coverage.symbol,\n index,\n ),\n kind: 'coverage' as const,\n });\n\n/** Projects one bounded Core inspection item through the schema 7 allowlist. */\nconst createInspectRecord = (\n item: IProjectInspectionItem,\n index: number,\n): IMoldeaCliInspectRecord => {\n const order = index.toString().padStart(6, '0');\n\n if (item.kind === 'agent') {\n const record: IMoldeaCliAgentRecord = {\n agentId: item.agent.agentId,\n key: createRecordKey(order, 'agent', item.agent.agentId, item.agent.runtimeId),\n kind: 'agent',\n runtimeId: item.agent.runtimeId,\n };\n\n return Object.freeze(record);\n }\n\n if (item.kind === 'diagnostic') {\n return Object.freeze({\n ...createMoldeaCliDiagnosticRecord(item.diagnostic, index),\n key: createRecordKey(\n order,\n 'diagnostic',\n item.diagnostic.source,\n item.diagnostic.severity,\n item.diagnostic.code,\n createMoldeaCliDiagnosticRecord(item.diagnostic, index).key,\n ),\n });\n }\n\n if (item.kind === 'coverage') return createCoverageRecord(item.coverage, index, order);\n\n const metadata = item.metadata;\n const record: IMoldeaCliMetadataRecord = {\n agentId: metadata.agentId,\n byteLength: metadata.byteLength,\n canonicalDigest: metadata.canonicalDigest,\n decisionId: metadata.decisionId,\n digest: metadata.digest,\n key: createRecordKey(order, 'metadata', metadata.path, metadata.kind, metadata.agentId),\n kind: 'metadata',\n metadataKind: metadata.kind,\n path: metadata.path,\n scalarLength: metadata.scalarLength,\n };\n\n return Object.freeze(record);\n};\n\n/** Creates content-free validation metadata and ordered diagnostic records. */\nexport const createMoldeaCliValidateProjection = (\n validation: IProjectValidationResult,\n): IMoldeaCliValidateProjection => {\n assertProjectValidationInvariant(validation);\n const diagnostics = validation.diagnostics.map((diagnostic, index) => {\n const record = createMoldeaCliDiagnosticRecord(diagnostic, index);\n return Object.freeze({\n ...record,\n key: createRecordKey(index.toString().padStart(6, '0'), 'diagnostic', record.key),\n });\n });\n const records = Object.freeze([\n ...diagnostics,\n ...validation.coverage.map((coverage, index) =>\n createCoverageRecord(\n coverage,\n index,\n (diagnostics.length + index).toString().padStart(6, '0'),\n ),\n ),\n ]);\n const snapshotDigest = calculateMoldeaCliJsonDigest({\n records,\n coverageCounts: validation.coverageCounts,\n acceptedWarningCount: validation.acceptedWarningCount,\n errorCount: validation.errorCount,\n formatVersion: validation.formatVersion,\n summary: validation.summary,\n valid: validation.valid,\n warningCount: validation.warningCount,\n } as unknown as IJsonValue);\n\n return Object.freeze({\n records,\n diagnosticCount: validation.diagnosticCount,\n acceptedWarningCount: validation.acceptedWarningCount,\n coverageCounts: validation.coverageCounts,\n errorCount: validation.errorCount,\n formatVersion: validation.formatVersion,\n snapshotDigest,\n source: MOLDEA_CLI_GIT_WORKING_TREE_SOURCE,\n valid: validation.valid,\n warningCount: validation.warningCount,\n });\n};\n\n/** Projects one bounded Core page through the content-free schema 7 allowlist. */\nexport const createMoldeaCliInspectProjection = (\n inspection: IProjectInspectionPageResult,\n): IMoldeaCliInspectProjection => {\n const project: IMoldeaCliInspectProjectMetadata | null =\n inspection.summary === null\n ? null\n : Object.freeze({\n manifest: Object.freeze({\n digest: inspection.summary.manifestDigest,\n path: inspection.summary.manifestPath,\n }),\n project: Object.freeze({\n digest: inspection.summary.projectDigest,\n path: inspection.summary.projectPath,\n }),\n });\n const records = Object.freeze(\n inspection.page.records.map(({ item }, index) => createInspectRecord(item, index)),\n );\n const sourceCursors = new Map(\n inspection.page.records.map((record, index) => {\n const projected = records[index];\n\n if (projected === undefined) {\n throw new TypeError('A projected inspection record is missing.');\n }\n\n return [projected.key, record.nextCursor] as const;\n }),\n );\n const snapshotDigest = inspection.inspectionDigest;\n\n return Object.freeze({\n counts: inspection.counts,\n formatVersion: inspection.formatVersion,\n getSourceCursor: (record: IMoldeaCliInspectRecord): string | null =>\n sourceCursors.get(record.key) ?? null,\n project,\n records,\n snapshotDigest,\n source: MOLDEA_CLI_GIT_WORKING_TREE_SOURCE,\n coverageCounts: inspection.coverageCounts,\n valid: inspection.valid,\n view: inspection.view,\n });\n};\n","// most stderr bytes one Git command may write before its result is refused as invalid output\nexport const MAX_GIT_DIAGNOSTIC_BYTES = 4096;\n\n/*\n * Seconds one Git command may run. The CLI's read-only commands finish in seconds even for a\n * 100,000-entry repository, so the ceiling only stops a Git process that hangs, such as on a\n * stalled network file system.\n */\nexport const GIT_TIMEOUT_SECONDS = 300;\n","import { getErrorCode } from 'jg-exception';\nimport { ERRORS as PROCESS_ERRORS, type IProcessResult } from 'jg-process';\nimport { ERRORS as GIT_ERRORS, assertGitSucceeded } from 'jg-git-commands';\n\nimport { MAX_GIT_DIAGNOSTIC_BYTES } from './constants.js';\nimport type { IGitFailureReason, IGitReadResult } from './types.js';\n\n/**\n * Creates one immutable Git failure.\n * @param reason Why the command failed.\n * @param subcommand The fixed Git subcommand that failed, when the caller knows it.\n * @returns The failed read result.\n */\nexport const createGitFailure = (\n reason: IGitFailureReason,\n subcommand?: string,\n): IGitReadResult<never> =>\n Object.freeze({ kind: 'failed', reason, ...(subcommand === undefined ? {} : { subcommand }) });\n\n/**\n * Classifies one Git error by its code, without retaining its diagnostics.\n * @param error The error a Git command or read rejected with.\n * @param signal The command's cancellation signal, whose abort takes precedence.\n * @returns The failure reason.\n */\nexport const classifyGitFailure = (error: unknown, signal?: AbortSignal): IGitFailureReason => {\n if (signal?.aborted === true) {\n return 'aborted';\n }\n\n switch (getErrorCode(error)) {\n case GIT_ERRORS.GIT_NOT_FOUND:\n return 'not-found';\n case GIT_ERRORS.GIT_REPOSITORY_NOT_FOUND:\n return 'repository-not-found';\n case GIT_ERRORS.GIT_ACCESS_DENIED:\n return 'access-denied';\n case GIT_ERRORS.GIT_OUTPUT_INVALID:\n return 'output-invalid';\n case PROCESS_ERRORS.PROCESS_OUTPUT_TOO_LARGE:\n return 'output-limit-exceeded';\n case PROCESS_ERRORS.PROCESS_START_FAILED: {\n const causeCode = getErrorCode((error as { readonly cause?: unknown }).cause);\n\n return causeCode === 'EACCES' || causeCode === 'EPERM' ? 'access-denied' : 'command-failed';\n }\n default:\n return 'command-failed';\n }\n};\n\n/**\n * Runs one typed Git read and turns its rejection into a failure reason.\n * @param read The read, such as one of jg-git-commands' typed commands.\n * @param signal The read's cancellation signal.\n * @param subcommand The fixed Git subcommand the read runs, named in its failure.\n * @returns A promise resolving to the read's value, or why it failed.\n */\nexport const readGit = async <TValue>(\n read: () => Promise<TValue>,\n signal?: AbortSignal,\n subcommand?: string,\n): Promise<IGitReadResult<TValue>> => {\n try {\n return Object.freeze({ kind: 'completed', value: await read() });\n } catch (error) {\n return createGitFailure(classifyGitFailure(error, signal), subcommand);\n }\n};\n\n/**\n * Checks one finished Git command. Git exits with 0 after warning on stderr that it skipped\n * something, so any diagnostic fails a command that otherwise succeeded.\n * @param result The command's result, as bytes.\n * @param subcommand The Git subcommand that ran.\n * @returns Why the command failed, or null when it succeeded without diagnostics.\n */\nexport const checkGitResult = (\n result: IProcessResult<Buffer>,\n subcommand: string,\n): IGitFailureReason | null => {\n if (result.stderr.byteLength > MAX_GIT_DIAGNOSTIC_BYTES) {\n return 'output-invalid';\n }\n\n try {\n assertGitSucceeded(result, subcommand);\n } catch (error) {\n return classifyGitFailure(error);\n }\n\n return result.stderr.byteLength === 0 ? null : 'output-invalid';\n};\n","import { runGit } from 'jg-git-commands';\n\nimport { GIT_TIMEOUT_SECONDS } from './constants.js';\nimport type { IGitCommandRunner } from './types.js';\nimport { checkGitResult, createGitFailure, readGit } from './utilities.js';\n\n/**\n * Runs one read-only Git command through jg-git-commands, bounded by the caller's combined output\n * limit and the CLI's timeout, and refuses any stderr. A failure names the subcommand.\n * @param args The command's trusted arguments, its subcommand first.\n * @param options The working directory, output limit, stdin, and cancellation.\n * @returns A promise resolving to the command's stdout, or why it failed.\n */\nexport const runGitCommand: IGitCommandRunner = async (\n args,\n { cwd, input, maxOutputBytes, signal },\n) => {\n const subcommand = args[0];\n const execution = await readGit(\n () =>\n runGit(args, {\n cwd,\n encoding: 'buffer',\n maxOutputBytes,\n timeoutSeconds: GIT_TIMEOUT_SECONDS,\n ...(input === undefined ? {} : { input }),\n ...(signal === undefined ? {} : { signal }),\n }),\n signal,\n subcommand,\n );\n\n if (execution.kind === 'failed') {\n return execution;\n }\n\n const reason = checkGitResult(execution.value, subcommand ?? '');\n\n return reason === null\n ? Object.freeze({ kind: 'completed', value: execution.value.stdout })\n : createGitFailure(reason, subcommand);\n};\n","// numeric components of the oldest Git version supported by the CLI\nexport const MINIMUM_GIT_VERSION_COMPONENTS = Object.freeze({\n major: 2,\n minor: 32,\n patch: 0,\n});\n\n// oldest Git version supported by the CLI\nexport const MINIMUM_GIT_VERSION = `${MINIMUM_GIT_VERSION_COMPONENTS.major}.${MINIMUM_GIT_VERSION_COMPONENTS.minor}.${MINIMUM_GIT_VERSION_COMPONENTS.patch}`;\n\n// most bytes the Git version command's stdout and stderr may take together\nexport const MAX_GIT_VERSION_OUTPUT_BYTES = 4096;\n","import { readGitVersion } from 'jg-git-commands';\n\nimport { GIT_TIMEOUT_SECONDS, readGit, type IGitFailureReason } from '../git-command/index.js';\nimport type { IMoldeaCliGitErrorCode } from '../presentation/index.js';\n\nimport { MAX_GIT_VERSION_OUTPUT_BYTES, MINIMUM_GIT_VERSION_COMPONENTS } from './constants.js';\nimport type {\n IGitVersion,\n IGitVersionPreflight,\n IGitVersionPreflightResult,\n IGitVersionReader,\n} from './types.js';\n\n/**\n * Maps Git failures to stable safe CLI errors.\n * @param reason The normalized Git failure reason.\n * @returns The public Git error code.\n */\nconst mapGitFailure = (reason: IGitFailureReason): IMoldeaCliGitErrorCode => {\n switch (reason) {\n case 'aborted':\n return 'GIT_OPERATION_ABORTED';\n case 'not-found':\n return 'GIT_NOT_FOUND';\n case 'access-denied':\n return 'GIT_ACCESS_DENIED';\n case 'output-limit-exceeded':\n case 'output-invalid':\n return 'GIT_VERSION_INVALID';\n case 'repository-not-found':\n case 'command-failed':\n return 'GIT_COMMAND_FAILED';\n }\n};\n\n/**\n * Determines whether a parsed Git version meets the supported minimum.\n * @param version The parsed Git version.\n * @returns Whether the numeric version is supported.\n */\nconst isGitVersionSupported = (version: IGitVersion): boolean => {\n if (version.major !== MINIMUM_GIT_VERSION_COMPONENTS.major) {\n return version.major > MINIMUM_GIT_VERSION_COMPONENTS.major;\n }\n\n if (version.minor !== MINIMUM_GIT_VERSION_COMPONENTS.minor) {\n return version.minor > MINIMUM_GIT_VERSION_COMPONENTS.minor;\n }\n\n return version.patch >= MINIMUM_GIT_VERSION_COMPONENTS.patch;\n};\n\n/**\n * Creates a Git prerequisite check around an injectable typed version read.\n * @param readVersion The installed Git version read.\n * @returns A preflight that validates the installed Git version.\n */\nexport const createGitVersionPreflight =\n (readVersion: IGitVersionReader = readGitVersion): IGitVersionPreflight =>\n async (directory, signal): Promise<IGitVersionPreflightResult> => {\n const versionResult = await readGit(\n () =>\n readVersion(directory, {\n maxOutputBytes: MAX_GIT_VERSION_OUTPUT_BYTES,\n timeoutSeconds: GIT_TIMEOUT_SECONDS,\n ...(signal === undefined ? {} : { signal }),\n }),\n signal,\n );\n\n if (versionResult.kind === 'failed') {\n return Object.freeze({ errorCode: mapGitFailure(versionResult.reason), kind: 'failed' });\n }\n\n if (!isGitVersionSupported(versionResult.value)) {\n return Object.freeze({ errorCode: 'GIT_VERSION_UNSUPPORTED', kind: 'failed' });\n }\n\n return Object.freeze({ kind: 'supported', version: Object.freeze({ ...versionResult.value }) });\n };\n","import { createMoldeaCliOwnedError } from '../presentation/index.js';\n\n/** Represents an inconsistent installed executable composition. */\nexport class MoldeaCliCompositionException extends Error {\n public readonly code = 'COMPOSITION_STATE_INVALID';\n\n /** Uses the canonical CLI-owned composition failure message. */\n public constructor() {\n super(createMoldeaCliOwnedError('COMPOSITION_STATE_INVALID').message);\n this.name = 'MoldeaCliCompositionException';\n }\n}\n","'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numeric identifiers include numeric identifiers but can be longer.\n// Therefore non-numeric identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifier, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a === b ? 0 : a < b ? -1 : 1\n }\n\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\n\nconst isPrereleaseIdentifier = (prerelease, identifier) => {\n const identifiers = identifier.split('.')\n if (identifiers.length > prerelease.length) {\n return false\n }\n\n for (let i = 0; i < identifiers.length; i++) {\n if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {\n return false\n }\n }\n\n return true\n}\n\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n if (this.major < other.major) {\n return -1\n }\n if (this.major > other.major) {\n return 1\n }\n if (this.minor < other.minor) {\n return -1\n }\n if (this.minor > other.minor) {\n return 1\n }\n if (this.patch < other.patch) {\n return -1\n }\n if (this.patch > other.patch) {\n return 1\n }\n return 0\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (isPrereleaseIdentifier(this.prerelease, identifier)) {\n const prereleaseBase = this.prerelease[identifier.split('.').length]\n if (isNaN(prereleaseBase)) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are prereleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","'use strict'\n\nconst parse = require('./parse')\nconst constants = require('../internal/constants')\nconst SemVer = require('../classes/semver')\n\nconst truncate = (version, truncation, options) => {\n if (!constants.RELEASE_TYPES.includes(truncation)) {\n return null\n }\n\n const clonedVersion = cloneInputVersion(version, options)\n return clonedVersion && doTruncation(clonedVersion, truncation)\n}\n\nconst cloneInputVersion = (version, options) => {\n const versionStringToParse = (\n version instanceof SemVer ? version.version : version\n )\n\n return parse(versionStringToParse, options)\n}\n\nconst doTruncation = (version, truncation) => {\n if (isPrerelease(truncation)) {\n return version.version\n }\n\n version.prerelease = []\n\n switch (truncation) {\n case 'major':\n version.minor = 0\n version.patch = 0\n break\n case 'minor':\n version.patch = 0\n break\n }\n\n return version.format()\n}\n\nconst isPrerelease = (type) => {\n return type.startsWith('pre')\n}\n\nmodule.exports = truncate\n","'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // strip build metadata so it can't bleed into the version\n range = range.replace(BUILDSTRIPRE, '')\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n src,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\n// unbounded global build-metadata stripper used by parseRange\nconst BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n comp = comp.replace(re[t.BUILD], '')\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\nconst invalidXRangeOrder = (M, m, p) => (\n (isX(M) && !isX(m)) ||\n (isX(m) && p && !isX(p))\n)\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n // if we're including prereleases in the match, then the lower bound is\n // -0, the lowest possible prerelease value, just like x-ranges and carets.\n // this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n if (invalidXRangeOrder(M, m, p)) {\n return comp\n }\n\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If LT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !c.test(gt.semver)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !c.test(lt.semver)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst truncate = require('./functions/truncate')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n truncate,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","// exact first-class package identities required by every CLI release\nexport const MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES = Object.freeze([\n '@moldea.ai/core',\n '@moldea.ai/repository',\n '@moldea.ai/repository-fs',\n] as const);\n\n// compatible first-class package lines this CLI release accepts\nexport const MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES = Object.freeze({\n '@moldea.ai/core': '^9.0.0',\n '@moldea.ai/repository': '^4.0.0',\n '@moldea.ai/repository-fs': '^4.0.0',\n} as const);\n","import { satisfies as doesVersionSatisfy, valid as isValidVersion, validRange } from 'semver';\n\nimport {\n MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES,\n MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES,\n} from './constants.js';\nimport type { IMoldeaCliCompositionStateInput } from './types.js';\n\nconst hasExactStringSet = (left: readonly string[], right: readonly string[]): boolean => {\n if (\n left.length !== right.length ||\n new Set(left).size !== left.length ||\n new Set(right).size !== right.length\n ) {\n return false;\n }\n\n const rightValues = new Set(right);\n return left.every((entry) => rightValues.has(entry));\n};\n\nconst hasUniquePositiveIntegers = (entries: readonly number[]): boolean =>\n entries.length > 0 &&\n entries.every((entry) => Number.isSafeInteger(entry) && entry > 0) &&\n new Set(entries).size === entries.length;\n\n/**\n * Verifies the installed package manifest and resolved package composition.\n * @param input The installed package, Core, Git, and JSON-schema state.\n * @returns Whether every runtime composition invariant is satisfied.\n */\nexport const isMoldeaCliCompositionStateValid = (\n input: IMoldeaCliCompositionStateInput,\n): boolean => {\n const { dependencies, installedPackageVersions, supportedNodeRange, version } =\n input.packageMetadata;\n\n if (\n isValidVersion(version) === null ||\n supportedNodeRange === null ||\n validRange(supportedNodeRange) === null ||\n isValidVersion(input.minimumGitVersion) === null ||\n input.outputSchemaVersion !== 7 ||\n dependencies === null ||\n installedPackageVersions === null ||\n !hasUniquePositiveIntegers(input.coreSupportedRepositoryFormatVersions)\n ) {\n return false;\n }\n\n const expectedPackageNames = [...MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES];\n const declaredPackageNames = Object.keys(dependencies).filter((packageName) =>\n packageName.startsWith('@moldea.ai/'),\n );\n const resolvedPackageNames = Object.keys(installedPackageVersions);\n\n if (\n !hasExactStringSet(declaredPackageNames, expectedPackageNames) ||\n !hasExactStringSet(resolvedPackageNames, expectedPackageNames)\n ) {\n return false;\n }\n\n return expectedPackageNames.every((packageName) => {\n const resolvedVersion = installedPackageVersions[packageName];\n const declaredRange = dependencies[packageName];\n const supportedRange = MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES[packageName];\n\n return (\n resolvedVersion !== undefined &&\n isValidVersion(resolvedVersion) !== null &&\n supportedRange !== undefined &&\n (declaredRange === supportedRange || declaredRange === `workspace:${supportedRange}`) &&\n doesVersionSatisfy(resolvedVersion, supportedRange)\n );\n });\n};\n","import { deepFreeze } from 'jg-utilities';\n\nimport type { IMoldeaCliCompositionResult, IMoldeaCliCompositionStateInput } from './types.js';\n\nconst compareIdentifiers = (left: string, right: string): number =>\n left < right ? -1 : left > right ? 1 : 0;\n\n/**\n * Creates the compact immutable composition result from validated installed state.\n * @param input The already validated installed and executable composition.\n * @returns A deeply immutable composition result in deterministic report order.\n */\nexport const createMoldeaCliCompositionResult = (\n input: IMoldeaCliCompositionStateInput,\n): IMoldeaCliCompositionResult => {\n const packages = Object.entries(input.packageMetadata.installedPackageVersions ?? {})\n .map(([name, version]) => ({ name, version }))\n .sort((left, right) => compareIdentifiers(left.name, right.name));\n\n return deepFreeze({\n minimumGitVersion: input.minimumGitVersion,\n packages,\n repositoryFormatVersions: [...input.coreSupportedRepositoryFormatVersions].sort(\n (left, right) => left - right,\n ),\n supportedNodeRange: input.packageMetadata.supportedNodeRange ?? '',\n });\n};\n","import { SUPPORTED_REPOSITORY_FORMAT_VERSIONS } from '@moldea.ai/core';\n\nimport { MINIMUM_GIT_VERSION } from '../git-version/index.js';\nimport { MOLDEA_CLI_JSON_SCHEMA_VERSION } from '../json-output-contract/index.js';\n\nimport { createMoldeaCliCompositionResult } from './transformers.js';\nimport type {\n IMoldeaCliCompositionResolution,\n IMoldeaCliCompositionStateInput,\n IMoldeaCliInstalledCompositionInput,\n} from './types.js';\nimport { isMoldeaCliCompositionStateValid } from './validations.js';\n\nconst INVALID_COMPOSITION_RESOLUTION = Object.freeze({ kind: 'invalid' as const });\n\n/**\n * Resolves one explicit runtime composition without emitting a partial composition result.\n * @param input The installed and actual runtime state to compare.\n * @returns A valid immutable result or the single invalid-state outcome.\n */\nexport const resolveMoldeaCliComposition = (\n input: IMoldeaCliCompositionStateInput,\n): IMoldeaCliCompositionResolution => {\n try {\n if (!isMoldeaCliCompositionStateValid(input)) {\n return INVALID_COMPOSITION_RESOLUTION;\n }\n\n return Object.freeze({\n kind: 'valid',\n result: createMoldeaCliCompositionResult(input),\n });\n } catch {\n return INVALID_COMPOSITION_RESOLUTION;\n }\n};\n\n/**\n * Checks installed package metadata and resolved first-class package identities.\n * @param input The installed package metadata.\n * @returns A valid immutable result or the single invalid-state outcome.\n */\nexport const resolveInstalledMoldeaCliComposition = (\n input: IMoldeaCliInstalledCompositionInput,\n): IMoldeaCliCompositionResolution =>\n resolveMoldeaCliComposition({\n coreSupportedRepositoryFormatVersions: SUPPORTED_REPOSITORY_FORMAT_VERSIONS,\n minimumGitVersion: MINIMUM_GIT_VERSION,\n outputSchemaVersion: MOLDEA_CLI_JSON_SCHEMA_VERSION,\n packageMetadata: input.packageMetadata,\n });\n"],"x_google_ignoreList":[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63],"mappings":";;;;;;;;;;;;AACA,IAAa,sBAAsB;CACjC,aAAa;CACb,SAAS;CACT,SAAS;CACT,OAAO;CACP,UAAU;AACZ;AAGA,IAAa,qBAAqB;CAChC,MAAM;CACN,MAAM;CACN,QAAQ;CACR,gBAAgB;CAChB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,kBAAkB;CAClB,gBAAgB;CAChB,eAAe;CACf,SAAS;CACT,MAAM;CACN,YAAY;CACZ,YAAY;CACZ,SAAS;AACX;AAGA,IAAa,qCAAqC,OAAO,OAAO;CAC9D,gBAAgB;CAChB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,kBAAkB;CAClB,eAAe;AACjB,CAAC;AClCD,IAAa,kCAAkC;;;;ACC/C,IAAa,+BAAb,cAAkD,MAAM;CACtD;;CAGA,YAAmB,MAAqC;EACtD,MAAM,IAAI;EACV,KAAK,OAAO;EACZ,KAAK,OAAO;CACd;AACF;;;ACeA,IAAM,iBAAiB;AACvB,IAAM,oBAAoB;AAC1B,IAAM,uBAAuB,OAAO,OAAO;CACzC;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,IAAa,gCAAgC,UAA8B;CACzE,OAAO,UAAU,UAAU,+BAA+B,O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,MAAM,WAAW,OAAO,QAAQ,MAAM,gBAAgB,4BAA4B,CAAC,CAAC,CAAC,CAClF,KAAK,CAAC,MAAM,cAAc;EAAE;EAAM;CAAQ,EAAE,CAAC,CAC7C,MAAM,MAAM,UAAU,mBAAmB,KAAK,MAAM,MAAM,IAAI,CAAC;CAElE,OAAO,WAAW;EAChB,mBAAmB,MAAM;EACzB;EACA,0BAA0B,CAAC,GAAG,MAAM,qCAAqC,CAAC,CAAC,MACxE,MAAM,UAAU,OAAO,KAC1B;EACA,oBAAoB,MAAM,gBAAgB,sBAAsB;CAClE,CAAC;AACH;;;ACdA,IAAM,iCAAiC,OAAO,OAAO,EAAE,MAAM,UAAmB,CAAC;;;;;;AAOjF,IAAa,+BACX,UACoC;CACpC,IAAI;EACF,IAAI,CAAC,iCAAiC,KAAK,GACzC,OAAO;EAGT,OAAO,OAAO,OAAO;GACnB,MAAM;GACN,QAAQ,iCAAiC,KAAK;EAChD,CAAC;CACH,QAAQ;EACN,OAAO;CACT;AACF;;;;;;AAOA,IAAa,wCACX,UAEA,4BAA4B;CAC1B,uCAAuC;CACvC,mBAAmB;CACnB,qBAAA;CACA,iBAAiB,MAAM;AACzB,CAAC"}
1
+ {"version":3,"file":"composition-BNE2Fn_6.js","names":[],"sources":["../../src/command-line/constants.ts","../../src/output-page/constants.ts","../../src/output-page/exception.ts","../../src/output-page/cursor.ts","../../src/output-page/page.ts","../../src/command-line/validations.ts","../../src/command-line/parser.ts","../../src/presentation/constants.ts","../../src/presentation/errors.ts","../../src/json-output-contract/document.ts","../../src/presentation/formatters.ts","../../src/presentation/transformers.ts","../../src/git-command/constants.ts","../../src/git-command/utilities.ts","../../src/git-command/run-git-command.ts","../../src/git-version/constants.ts","../../src/git-version/preflight.ts","../../src/composition/exception.ts","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js","../../../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js","../../src/composition/constants.ts","../../src/composition/validations.ts","../../src/composition/transformers.ts","../../src/composition/composition.ts"],"sourcesContent":["// schema 7 command names accepted by the executable\nexport const MOLDEA_CLI_COMMANDS = {\n Composition: 'composition',\n Content: 'content',\n Inspect: 'inspect',\n Scope: 'scope',\n Validate: 'validate',\n} as const;\n\n// option names supported by the schema 7 command grammar\nexport const MOLDEA_CLI_OPTIONS = {\n Help: '--help',\n Json: '--json',\n Cursor: '--cursor',\n MaxDiagnostics: '--max-diagnostics',\n MaxEntries: '--max-entries',\n MaxCoverage: '--max-coverage',\n MaxFileBytes: '--max-file-bytes',\n MaxManifestBytes: '--max-manifest-bytes',\n MaxOutputBytes: '--max-output-bytes',\n MaxTotalBytes: '--max-total-bytes',\n NoColor: '--no-color',\n Path: '--path',\n PathsStdin: '--paths-stdin',\n Repository: '--repository',\n Version: '--version',\n} as const;\n\n// default resource bounds forwarded by later command-composition slices\nexport const DEFAULT_MOLDEA_CLI_RESOURCE_LIMITS = Object.freeze({\n maxDiagnostics: 10_000,\n maxEntries: 100_000,\n maxCoverage: 10_000,\n maxFileBytes: 8_388_608,\n maxManifestBytes: 2_097_152,\n maxTotalBytes: 134_217_728,\n});\n","// inclusive JSON output-page bounds and default transport budget\nexport const MOLDEA_CLI_MIN_OUTPUT_BYTES = 4_096;\nexport const MOLDEA_CLI_DEFAULT_OUTPUT_BYTES = 65_536;\nexport const MOLDEA_CLI_MAX_OUTPUT_BYTES = 1_048_576;\n\n// cursor format owned by CLI schema 7\nexport const MOLDEA_CLI_CURSOR_VERSION = 2 as const;\n","import type { IMoldeaCliOutputPageErrorCode } from './types.js';\n\n/** Represents a safe pagination or output-budget failure owned by the CLI. */\nexport class MoldeaCliOutputPageException extends Error {\n public readonly code: IMoldeaCliOutputPageErrorCode;\n\n /** Creates one output-page failure with a stable public code. */\n public constructor(code: IMoldeaCliOutputPageErrorCode) {\n super(code);\n this.code = code;\n this.name = 'MoldeaCliOutputPageException';\n }\n}\n","import { timingSafeEqual } from 'node:crypto';\nimport { hashValue } from 'jg-crypto';\nimport { stringifyJsonDeterministically } from 'jg-utilities';\n\nimport type { IJsonValue } from '../json-serialization/index.js';\n\nimport { MOLDEA_CLI_CURSOR_VERSION } from './constants.js';\nimport { MoldeaCliOutputPageException } from './exception.js';\nimport type {\n IMoldeaCliCursorInput,\n IMoldeaCliCursorState,\n IMoldeaCliPageCommand,\n} from './types.js';\n\ninterface IMoldeaCliCursorPayload {\n readonly command: IMoldeaCliPageCommand;\n readonly filtersDigest: string;\n readonly lastKey: string;\n readonly sourceCursor: string | null;\n readonly snapshotDigest: string;\n readonly version: typeof MOLDEA_CLI_CURSOR_VERSION;\n}\n\ninterface IMoldeaCliCursorDocument extends IMoldeaCliCursorPayload {\n readonly checksum: string;\n}\n\nconst SHA256_PATTERN = /^sha256:[0-9a-f]{64}$/u;\nconst BASE64URL_PATTERN = /^[A-Za-z0-9_-]+$/u;\nconst CURSOR_DOCUMENT_KEYS = Object.freeze([\n 'checksum',\n 'command',\n 'filtersDigest',\n 'lastKey',\n 'snapshotDigest',\n 'sourceCursor',\n 'version',\n]);\n\n/** Calculates one stable SHA-256 identifier for deterministic JSON text. */\nexport const calculateMoldeaCliJsonDigest = (value: IJsonValue): string => {\n return `sha256:${hashValue(stringifyJsonDeterministically(value, { strict: true }))}`;\n};\n\n/** Calculates the checksum for one cursor payload without its checksum field. */\nconst calculateCursorChecksum = (payload: IMoldeaCliCursorPayload): string => {\n return calculateMoldeaCliJsonDigest(payload as unknown as IJsonValue);\n};\n\n/** Compares fixed-format checksums without data-dependent early termination. */\nconst areChecksumsEqual = (left: string, right: string): boolean => {\n const leftBytes = Buffer.from(left, 'utf8');\n const rightBytes = Buffer.from(right, 'utf8');\n\n return leftBytes.length === rightBytes.length && timingSafeEqual(leftBytes, rightBytes);\n};\n\n/** Determines whether an unknown value is one strict cursor document. */\nconst isCursorDocument = (value: unknown): value is IMoldeaCliCursorDocument => {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return false;\n }\n\n const record = value as Readonly<Record<string, unknown>>;\n const keys = Object.keys(record).sort();\n\n return (\n keys.length === CURSOR_DOCUMENT_KEYS.length &&\n keys.every((key, index) => key === CURSOR_DOCUMENT_KEYS[index]) &&\n record['version'] === MOLDEA_CLI_CURSOR_VERSION &&\n (record['command'] === 'content' ||\n record['command'] === 'inspect' ||\n record['command'] === 'scope' ||\n record['command'] === 'validate') &&\n typeof record['filtersDigest'] === 'string' &&\n SHA256_PATTERN.test(record['filtersDigest']) &&\n typeof record['lastKey'] === 'string' &&\n record['lastKey'].length > 0 &&\n (record['sourceCursor'] === null || typeof record['sourceCursor'] === 'string') &&\n typeof record['snapshotDigest'] === 'string' &&\n SHA256_PATTERN.test(record['snapshotDigest']) &&\n typeof record['checksum'] === 'string' &&\n SHA256_PATTERN.test(record['checksum'])\n );\n};\n\n/** Encodes one command-, filter-, and snapshot-bound continuation cursor. */\nexport const encodeMoldeaCliCursor = (\n command: IMoldeaCliPageCommand,\n filters: IJsonValue,\n snapshotDigest: string,\n lastKey: string,\n sourceCursor: string | null = null,\n): string => {\n const payload: IMoldeaCliCursorPayload = {\n command,\n filtersDigest: calculateMoldeaCliJsonDigest(filters),\n lastKey,\n sourceCursor,\n snapshotDigest,\n version: MOLDEA_CLI_CURSOR_VERSION,\n };\n const document: IMoldeaCliCursorDocument = {\n ...payload,\n checksum: calculateCursorChecksum(payload),\n };\n\n return Buffer.from(stringifyJsonDeterministically(document, { strict: true }), 'utf8').toString(\n 'base64url',\n );\n};\n\n/**\n * Decodes and validates one opaque continuation cursor.\n * @param input The current command state and untrusted cursor.\n * @returns The validated last composite record key.\n * @throws\n * - CURSOR_INVALID: The continuation cursor is invalid for this request.\n * - CURSOR_SNAPSHOT_CHANGED: The continuation cursor belongs to a different repository snapshot.\n */\nexport const decodeMoldeaCliCursor = (input: IMoldeaCliCursorInput): IMoldeaCliCursorState => {\n let decoded: unknown;\n\n try {\n if (!BASE64URL_PATTERN.test(input.cursor)) {\n throw new TypeError('The cursor is not canonical base64url.');\n }\n\n const bytes = Buffer.from(input.cursor, 'base64url');\n\n if (bytes.toString('base64url') !== input.cursor) {\n throw new TypeError('The cursor is not canonical base64url.');\n }\n\n const text = bytes.toString('utf8');\n decoded = JSON.parse(text) as unknown;\n } catch {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n if (!isCursorDocument(decoded)) {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n const { checksum, ...payload } = decoded;\n\n if (\n !areChecksumsEqual(checksum, calculateCursorChecksum(payload)) ||\n decoded.command !== input.command ||\n decoded.filtersDigest !== calculateMoldeaCliJsonDigest(input.filters)\n ) {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n if (input.snapshotDigest !== undefined && decoded.snapshotDigest !== input.snapshotDigest) {\n throw new MoldeaCliOutputPageException('CURSOR_SNAPSHOT_CHANGED');\n }\n\n return Object.freeze({\n lastKey: decoded.lastKey,\n snapshotDigest: decoded.snapshotDigest,\n sourceCursor: decoded.sourceCursor,\n });\n};\n","import { takeWithinByteBudget } from 'jg-utilities';\n\nimport { decodeMoldeaCliCursor, encodeMoldeaCliCursor } from './cursor.js';\nimport { MoldeaCliOutputPageException } from './exception.js';\nimport type {\n IMoldeaCliOutputPage,\n IMoldeaCliOutputPageInput,\n IMoldeaCliOutputRecord,\n} from './types.js';\n\n/** Ensures records have unique keys in strict ascending order. */\nconst assertRecordOrder = (records: readonly IMoldeaCliOutputRecord[]): void => {\n for (let index = 0; index < records.length; index += 1) {\n const key = records[index]?.key;\n const previousKey = records[index - 1]?.key;\n\n if (\n key === undefined ||\n key.length === 0 ||\n (previousKey !== undefined && key <= previousKey)\n ) {\n throw new TypeError('Output records must have unique keys in ascending order.');\n }\n }\n};\n\n/**\n * Selects the largest exact serialized output page that fits its byte budget.\n * @param input Ordered records, continuation state, and an exact final-document measurement.\n * @returns A frozen record page with a snapshot-bound continuation cursor when needed.\n * @throws\n * - CURSOR_INVALID: The continuation cursor is invalid for this request.\n * - CURSOR_SNAPSHOT_CHANGED: The continuation cursor belongs to a different repository snapshot.\n * - OUTPUT_BUDGET_TOO_SMALL: The output byte budget cannot contain the next complete result.\n */\nexport const createMoldeaCliOutputPage = <TRecord extends IMoldeaCliOutputRecord>(\n input: IMoldeaCliOutputPageInput<TRecord>,\n): IMoldeaCliOutputPage<TRecord> => {\n assertRecordOrder(input.records);\n\n const cursorState =\n input.cursor === null\n ? null\n : decodeMoldeaCliCursor({\n command: input.command,\n cursor: input.cursor,\n filters: input.filters,\n snapshotDigest: input.snapshotDigest,\n });\n const startIndex =\n cursorState === null\n ? 0\n : cursorState.sourceCursor !== null\n ? 0\n : input.records.findIndex(({ key }) => key === cursorState.lastKey) + 1;\n\n if (cursorState !== null && cursorState.sourceCursor === null && startIndex === 0) {\n throw new MoldeaCliOutputPageException('CURSOR_INVALID');\n }\n\n const emptyRecords = Object.freeze([]) as readonly TRecord[];\n const emptyPage = Object.freeze({ cursor: null, records: emptyRecords });\n\n if (startIndex === input.records.length) {\n if (input.measure(emptyPage, 2) > input.maxOutputBytes) {\n throw new MoldeaCliOutputPageException('OUTPUT_BUDGET_TOO_SMALL');\n }\n\n return emptyPage;\n }\n\n /** Creates the cursor that continues after a page ending with the record at this end index. */\n const createCursor = (record: TRecord, endIndex: number): string | null => {\n const sourceCursor = input.sourceCursorForRecord?.(record) ?? null;\n const hasMore =\n input.sourceCursorForRecord === undefined\n ? endIndex < input.records.length\n : sourceCursor !== null;\n\n return hasMore\n ? encodeMoldeaCliCursor(\n input.command,\n input.filters,\n input.snapshotDigest,\n record.key,\n sourceCursor,\n )\n : null;\n };\n\n const selectedRecords = takeWithinByteBudget(input.records.slice(startIndex), {\n maxBytes: input.maxOutputBytes,\n measurePage: (page, itemsBytes) =>\n input.measure(\n Object.freeze({\n cursor: createCursor(page[page.length - 1] as TRecord, startIndex + page.length),\n records: page,\n }),\n itemsBytes,\n ),\n });\n const lastRecord = selectedRecords[selectedRecords.length - 1];\n\n if (lastRecord === undefined) {\n throw new MoldeaCliOutputPageException('OUTPUT_BUDGET_TOO_SMALL');\n }\n\n return Object.freeze({\n cursor: createCursor(lastRecord, startIndex + selectedRecords.length),\n records: Object.freeze(selectedRecords),\n });\n};\n","import { MOLDEA_CLI_MAX_OUTPUT_BYTES, MOLDEA_CLI_MIN_OUTPUT_BYTES } from '../output-page/index.js';\n\nimport type { IMoldeaCliResourceLimits } from './types.js';\n\nconst POSITIVE_INTEGER_PATTERN = /^\\d+$/u;\n\n/**\n * Parses one strict base-10 positive safe integer option value.\n * @param input The untrusted command-line token.\n * @returns The parsed integer, or null when the token is invalid.\n */\nexport const parsePositiveSafeInteger = (input: string): number | null => {\n if (!POSITIVE_INTEGER_PATTERN.test(input)) {\n return null;\n }\n\n const parsedInteger = Number(input);\n\n return Number.isSafeInteger(parsedInteger) && parsedInteger > 0 ? parsedInteger : null;\n};\n\n/** Parses one output byte budget inside the schema 7 transport bounds. */\nexport const parseMoldeaCliOutputByteLimit = (input: string): number | null => {\n const parsed = parsePositiveSafeInteger(input);\n\n return parsed !== null &&\n parsed >= MOLDEA_CLI_MIN_OUTPUT_BYTES &&\n parsed <= MOLDEA_CLI_MAX_OUTPUT_BYTES\n ? parsed\n : null;\n};\n\n/**\n * Validates the cross-limit ordering required by the CLI composition.\n * @param limits The effective resource limits.\n * @returns Whether manifest, file, and total byte limits are consistently ordered.\n */\nexport const areMoldeaCliResourceLimitsConsistent = (limits: IMoldeaCliResourceLimits): boolean => {\n return (\n limits.maxManifestBytes <= limits.maxFileBytes && limits.maxFileBytes <= limits.maxTotalBytes\n );\n};\n\n/**\n * Determines whether one repository option is safe scalar host-path text.\n * @param input The untrusted command-line token.\n * @returns Whether the token is non-empty scalar text without NUL.\n */\nexport const isRepositoryDirectoryInputValid = (input: string): boolean => {\n return input.length > 0 && !input.includes('\\0') && input.isWellFormed();\n};\n\n/** Determines whether one opaque cursor token is bounded safe scalar text. */\nexport const isMoldeaCliCursorInputValid = (input: string): boolean => {\n return (\n input.length > 0 && input.length <= 16_384 && !input.includes('\\0') && input.isWellFormed()\n );\n};\n","import { MOLDEA_CLI_DEFAULT_OUTPUT_BYTES } from '../output-page/index.js';\n\nimport {\n DEFAULT_MOLDEA_CLI_RESOURCE_LIMITS,\n MOLDEA_CLI_COMMANDS,\n MOLDEA_CLI_OPTIONS,\n} from './constants.js';\nimport type {\n IMoldeaCliArgumentError,\n IMoldeaCliArgumentErrorCode,\n IMoldeaCliCommand,\n IMoldeaCliCommandOptions,\n IMoldeaCliParseResult,\n IMoldeaCliResourceLimits,\n} from './types.js';\nimport {\n areMoldeaCliResourceLimitsConsistent,\n isMoldeaCliCursorInputValid,\n isRepositoryDirectoryInputValid,\n parseMoldeaCliOutputByteLimit,\n parsePositiveSafeInteger,\n} from './validations.js';\n\nconst COMMAND_NAMES = new Set<IMoldeaCliCommand>(Object.values(MOLDEA_CLI_COMMANDS));\nconst RESOURCE_OPTION_FIELDS = {\n [MOLDEA_CLI_OPTIONS.MaxDiagnostics]: 'maxDiagnostics',\n [MOLDEA_CLI_OPTIONS.MaxEntries]: 'maxEntries',\n [MOLDEA_CLI_OPTIONS.MaxCoverage]: 'maxCoverage',\n [MOLDEA_CLI_OPTIONS.MaxFileBytes]: 'maxFileBytes',\n [MOLDEA_CLI_OPTIONS.MaxManifestBytes]: 'maxManifestBytes',\n [MOLDEA_CLI_OPTIONS.MaxTotalBytes]: 'maxTotalBytes',\n} as const satisfies Readonly<Record<string, keyof IMoldeaCliResourceLimits>>;\n\n// mutable construction shape frozen before the normalized invocation is returned\ntype IMutableMoldeaCliResourceLimits = {\n -readonly [Key in keyof IMoldeaCliResourceLimits]: IMoldeaCliResourceLimits[Key];\n};\n\nconst createArgumentError = (\n code: IMoldeaCliArgumentErrorCode,\n command: IMoldeaCliCommand | null,\n isJson: boolean,\n): IMoldeaCliArgumentError => ({ code, command, isJson, kind: 'error' });\n\nconst isMoldeaCliCommand = (input: string | undefined): input is IMoldeaCliCommand => {\n return input !== undefined && COMMAND_NAMES.has(input as IMoldeaCliCommand);\n};\n\n/**\n * Parses the complete schema 7 command grammar without mutating caller arguments.\n * @param commandLineArguments The process arguments after the executable path.\n * @returns A normalized command, informational request, or safe invocation error.\n */\nexport const parseMoldeaCliArguments = (\n commandLineArguments: readonly string[],\n): IMoldeaCliParseResult => {\n const isJson = commandLineArguments.includes(MOLDEA_CLI_OPTIONS.Json);\n\n if (commandLineArguments.length === 0) {\n return { command: null, kind: 'help' };\n }\n\n const firstArgument = commandLineArguments[0];\n\n if (firstArgument === MOLDEA_CLI_OPTIONS.Help) {\n return commandLineArguments.length === 1\n ? { command: null, kind: 'help' }\n : createArgumentError('INVALID_ARGUMENT', null, isJson);\n }\n\n if (firstArgument === MOLDEA_CLI_OPTIONS.Version) {\n return commandLineArguments.length === 1\n ? { kind: 'version' }\n : createArgumentError('INVALID_ARGUMENT', null, isJson);\n }\n\n const command = isMoldeaCliCommand(firstArgument) ? firstArgument : null;\n\n if (command === null) {\n return createArgumentError('INVALID_ARGUMENT', null, isJson);\n }\n\n if (commandLineArguments.length === 2 && commandLineArguments[1] === MOLDEA_CLI_OPTIONS.Help) {\n return { command, kind: 'help' };\n }\n\n const seenOptions = new Set<string>();\n const resourceLimits: IMutableMoldeaCliResourceLimits = {\n ...DEFAULT_MOLDEA_CLI_RESOURCE_LIMITS,\n };\n let isColorDisabled = false;\n let cursor: string | null = null;\n let maxOutputBytes = MOLDEA_CLI_DEFAULT_OUTPUT_BYTES;\n let path: string | null = null;\n let pathsInput: IMoldeaCliCommandOptions['pathsInput'] = 'none';\n let repositoryDirectory: string | null = null;\n\n for (let index = 1; index < commandLineArguments.length; index += 1) {\n const option = commandLineArguments[index];\n\n if (option === undefined || seenOptions.has(option)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n seenOptions.add(option);\n\n if (option === MOLDEA_CLI_OPTIONS.Json) {\n continue;\n }\n\n if (option === MOLDEA_CLI_OPTIONS.NoColor) {\n isColorDisabled = true;\n continue;\n }\n\n if (option === MOLDEA_CLI_OPTIONS.PathsStdin) {\n pathsInput = 'stdin';\n continue;\n }\n\n if (option === MOLDEA_CLI_OPTIONS.Help || option === MOLDEA_CLI_OPTIONS.Version) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n const resourceField = RESOURCE_OPTION_FIELDS[option as keyof typeof RESOURCE_OPTION_FIELDS];\n const isRepositoryOption = option === MOLDEA_CLI_OPTIONS.Repository;\n const isCursorOption = option === MOLDEA_CLI_OPTIONS.Cursor;\n const isOutputLimitOption = option === MOLDEA_CLI_OPTIONS.MaxOutputBytes;\n const isPathOption = option === MOLDEA_CLI_OPTIONS.Path;\n\n if (\n resourceField === undefined &&\n !isRepositoryOption &&\n !isCursorOption &&\n !isOutputLimitOption &&\n !isPathOption\n ) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (command === MOLDEA_CLI_COMMANDS.Composition) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n const optionValue = commandLineArguments[index + 1];\n\n if (optionValue === undefined || optionValue.startsWith('--')) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n index += 1;\n\n if (isCursorOption) {\n if (!isMoldeaCliCursorInputValid(optionValue)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n cursor = optionValue;\n continue;\n }\n\n if (isOutputLimitOption) {\n const parsedOutputLimit = parseMoldeaCliOutputByteLimit(optionValue);\n\n if (parsedOutputLimit === null) {\n return createArgumentError('RESOURCE_LIMIT_CONFIGURATION_INVALID', command, isJson);\n }\n\n maxOutputBytes = parsedOutputLimit;\n continue;\n }\n\n if (isPathOption) {\n if (!isRepositoryDirectoryInputValid(optionValue)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n path = optionValue;\n pathsInput = 'path';\n continue;\n }\n\n if (isRepositoryOption) {\n if (!isRepositoryDirectoryInputValid(optionValue)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n repositoryDirectory = optionValue;\n continue;\n }\n\n const parsedLimit = parsePositiveSafeInteger(optionValue);\n\n if (parsedLimit === null || resourceField === undefined) {\n return createArgumentError('RESOURCE_LIMIT_CONFIGURATION_INVALID', command, isJson);\n }\n\n resourceLimits[resourceField] = parsedLimit;\n }\n\n if (!areMoldeaCliResourceLimitsConsistent(resourceLimits)) {\n return createArgumentError('RESOURCE_LIMIT_CONFIGURATION_INVALID', command, isJson);\n }\n\n const isScope = command === MOLDEA_CLI_COMMANDS.Scope;\n const isContent = command === MOLDEA_CLI_COMMANDS.Content;\n const hasPathInput = path !== null;\n const hasStdinInput = seenOptions.has(MOLDEA_CLI_OPTIONS.PathsStdin);\n\n if ((hasPathInput || hasStdinInput) && !isScope && !isContent) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (isScope && hasPathInput === hasStdinInput) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (isContent && (!hasPathInput || hasStdinInput)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (isScope && seenOptions.has(MOLDEA_CLI_OPTIONS.MaxCoverage)) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (\n isContent &&\n [\n MOLDEA_CLI_OPTIONS.MaxDiagnostics,\n MOLDEA_CLI_OPTIONS.MaxCoverage,\n MOLDEA_CLI_OPTIONS.MaxManifestBytes,\n ].some((option) => seenOptions.has(option))\n ) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n if (!isJson && (cursor !== null || seenOptions.has(MOLDEA_CLI_OPTIONS.MaxOutputBytes))) {\n return createArgumentError('INVALID_ARGUMENT', command, isJson);\n }\n\n const options: IMoldeaCliCommandOptions = {\n cursor,\n isColorDisabled,\n isJson,\n maxOutputBytes,\n path,\n pathsInput,\n repositoryDirectory,\n resourceLimits: Object.freeze({ ...resourceLimits }),\n };\n\n return {\n invocation: Object.freeze({ command, options: Object.freeze(options) }),\n kind: 'command',\n };\n};\n","import { MOLDEA_CLI_COMMANDS } from '../command-line/index.js';\n\n// stable safe presentation contracts for errors implemented by the CLI\nexport const MOLDEA_CLI_ERROR_DEFINITIONS = Object.freeze({\n COMPOSITION_STATE_INVALID: Object.freeze({\n message: 'The installed composition state is invalid.',\n retryable: false,\n source: 'cli',\n }),\n CONTENT_INVALID: Object.freeze({\n message: 'The requested canonical asset is not valid moldea text.',\n retryable: false,\n source: 'cli',\n }),\n CONTENT_PATH_INVALID: Object.freeze({\n message: 'The content path must identify one canonical moldea text asset.',\n retryable: false,\n source: 'cli',\n }),\n CURSOR_INVALID: Object.freeze({\n message: 'The continuation cursor is invalid for this request.',\n retryable: false,\n source: 'cli',\n }),\n CURSOR_SNAPSHOT_CHANGED: Object.freeze({\n message: 'The continuation cursor belongs to a different repository snapshot.',\n retryable: true,\n source: 'cli',\n }),\n GIT_ACCESS_DENIED: Object.freeze({\n message: 'Git access was denied.',\n retryable: true,\n source: 'git',\n }),\n GIT_COMMAND_FAILED: Object.freeze({\n message: 'The Git command failed.',\n retryable: true,\n source: 'git',\n }),\n GIT_CONTENT_TRANSFORM_UNSUPPORTED: Object.freeze({\n message: 'The requested file uses an unsupported Git content transformation.',\n retryable: false,\n source: 'git',\n }),\n GIT_NOT_FOUND: Object.freeze({\n message: 'The Git executable is unavailable.',\n retryable: false,\n source: 'git',\n }),\n GIT_OPERATION_ABORTED: Object.freeze({\n message: 'The Git operation was aborted.',\n retryable: true,\n source: 'git',\n }),\n GIT_OUTPUT_INVALID: Object.freeze({\n message: 'Git returned invalid output.',\n retryable: false,\n source: 'git',\n }),\n GIT_REPOSITORY_NOT_FOUND: Object.freeze({\n message: 'The selected path is not inside a Git repository.',\n retryable: false,\n source: 'git',\n }),\n GIT_SPARSE_CHECKOUT_UNSUPPORTED: Object.freeze({\n message: 'Sparse Git checkouts are unsupported.',\n retryable: false,\n source: 'git',\n }),\n GIT_VERSION_INVALID: Object.freeze({\n message: 'The Git version output is invalid.',\n retryable: false,\n source: 'git',\n }),\n GIT_VERSION_UNSUPPORTED: Object.freeze({\n message: 'The installed Git version is unsupported.',\n retryable: false,\n source: 'git',\n }),\n GIT_WORK_TREE_REQUIRED: Object.freeze({\n message: 'A usable Git working tree is required.',\n retryable: false,\n source: 'git',\n }),\n INTERNAL_ERROR: Object.freeze({\n message: 'The command could not be completed.',\n retryable: false,\n source: 'cli',\n }),\n INVALID_ARGUMENT: Object.freeze({\n message: 'The command invocation is invalid.',\n retryable: false,\n source: 'cli',\n }),\n OUTPUT_BUDGET_TOO_SMALL: Object.freeze({\n message: 'The output byte budget cannot contain the next complete result.',\n retryable: false,\n source: 'cli',\n }),\n PATH_INPUT_INVALID: Object.freeze({\n message:\n 'The scope path input is invalid. Use leading-slash repository-logical paths and NUL-delimited UTF-8 on stdin.',\n retryable: false,\n source: 'cli',\n }),\n RESOURCE_LIMIT_CONFIGURATION_INVALID: Object.freeze({\n message: 'The resource-limit configuration is invalid.',\n retryable: false,\n source: 'cli',\n }),\n RESOURCE_LIMIT_EXCEEDED: Object.freeze({\n message: 'A resource limit was exceeded.',\n retryable: false,\n source: 'cli',\n }),\n WORKING_TREE_UNSTABLE: Object.freeze({\n message: 'The working tree did not remain stable.',\n retryable: true,\n source: 'cli',\n }),\n} as const);\n\n// source descriptor for results derived from the selected Git working tree\nexport const MOLDEA_CLI_GIT_WORKING_TREE_SOURCE = Object.freeze({\n kind: 'git-working-tree' as const,\n});\n\n// top-level help presented without repository access\nexport const MOLDEA_CLI_TOP_LEVEL_HELP = `Usage: moldea <command> [options]\n\nCommands:\n validate Validate the current moldea project.\n inspect Inspect content-free project metadata.\n scope Match changed paths to declared moldea relationships.\n content Read one canonical moldea asset explicitly.\n composition Report the installed CLI composition state.\n\nGlobal options:\n --help Show top-level help.\n --version Show the CLI version.\n\nRun \"moldea <command> --help\" for command-specific options.\n`;\n\nconst REPOSITORY_OPTIONS_HELP = ` --repository <path> Select a Git working-tree directory.\n --json Emit one machine-readable JSON result.\n --no-color Disable ANSI styling in human output.\n`;\n\nconst BASE_RESOURCE_OPTIONS_HELP = ` --max-entries <integer> Override the repository entry limit.\n --max-file-bytes <integer> Override the per-file byte limit.\n --max-total-bytes <integer> Override the total cached-byte limit.\n`;\n\nconst INSPECTION_RESOURCE_OPTIONS_HELP = `${BASE_RESOURCE_OPTIONS_HELP} --max-manifest-bytes <integer> Override the manifest byte limit.\n --max-diagnostics <integer> Override the diagnostic count limit.\n`;\n\nconst PAGINATION_OPTIONS_HELP = ` --max-output-bytes <integer> Bound JSON output from 4096 to 1048576 bytes.\n --cursor <opaque-cursor> Continue a prior JSON result page.\n`;\n\nconst COMPLETE_INSPECTION_OPTIONS_HELP = `${REPOSITORY_OPTIONS_HELP}${INSPECTION_RESOURCE_OPTIONS_HELP} --max-coverage <integer> Override the binding coverage count limit.\n${PAGINATION_OPTIONS_HELP}`;\n\nconst SCOPE_OPTIONS_HELP = `${REPOSITORY_OPTIONS_HELP}${INSPECTION_RESOURCE_OPTIONS_HELP}${PAGINATION_OPTIONS_HELP}`;\n\nconst CONTENT_OPTIONS_HELP = `${REPOSITORY_OPTIONS_HELP}${BASE_RESOURCE_OPTIONS_HELP}${PAGINATION_OPTIONS_HELP}`;\n\n// complete command-specific help keyed by the closed command set\nexport const MOLDEA_CLI_COMMAND_HELP = {\n [MOLDEA_CLI_COMMANDS.Composition]: `Usage: moldea composition [options]\n\nReport the installed CLI composition state.\n\nOptions:\n --json Emit one machine-readable JSON result.\n --no-color Disable ANSI styling in human output.\n --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Inspect]: `Usage: moldea inspect [options]\n\nInspect content-free metadata for the current moldea project.\n\nOptions:\n${COMPLETE_INSPECTION_OPTIONS_HELP} --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Scope]: `Usage: moldea scope (--path <logical-path> | --paths-stdin) [options]\n\nMatch changed repository paths to declared moldea relationships. The stdin form accepts NUL-delimited UTF-8 logical paths.\n\nOptions:\n${SCOPE_OPTIONS_HELP} --path <logical-path> Match one repository-logical path.\n --paths-stdin Read NUL-delimited paths from stdin.\n --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Content]: `Usage: moldea content --path <canonical-logical-path> [options]\n\nRead one canonical moldea text asset in bounded Unicode-safe chunks.\n\nOptions:\n${CONTENT_OPTIONS_HELP} --path <canonical-logical-path> Select exactly one canonical moldea file.\n --help Show this help.\n`,\n [MOLDEA_CLI_COMMANDS.Validate]: `Usage: moldea validate [options]\n\nValidate the current moldea project.\n\nOptions:\n${COMPLETE_INSPECTION_OPTIONS_HELP} --help Show this help.\n`,\n} as const;\n","import { MOLDEA_CLI_ERROR_DEFINITIONS } from './constants.js';\nimport type { IMoldeaCliError, IMoldeaCliOwnedErrorCode } from './types.js';\n\nconst EMPTY_ERROR_DETAILS = Object.freeze({});\n\n/**\n * Creates one immutable safe error from a CLI- or Git-owned definition.\n * @param code The stable executable-owned error code.\n * @param details Safe fixed details, such as the Git subcommand that failed.\n * @returns The complete safe error object.\n */\nexport const createMoldeaCliOwnedError = (\n code: IMoldeaCliOwnedErrorCode,\n details: IMoldeaCliError['details'] = EMPTY_ERROR_DETAILS,\n): IMoldeaCliError => {\n const definition = MOLDEA_CLI_ERROR_DEFINITIONS[code];\n\n return Object.freeze({\n code,\n details: Object.freeze({ ...details }),\n message: definition.message,\n path: null,\n retryable: definition.retryable,\n source: definition.source,\n });\n};\n","import { stringifyJsonDeterministically } from 'jg-utilities';\n\nimport { MOLDEA_CLI_JSON_SCHEMA_VERSION } from './constants.js';\nimport type { IMoldeaCliJsonDocumentInput, IMoldeaCliJsonEnvelope } from './types.js';\n\n/** Creates one strict schema 7 JSON envelope. */\nexport const createMoldeaCliJsonEnvelope = <TResult>(\n input: IMoldeaCliJsonDocumentInput<TResult>,\n): IMoldeaCliJsonEnvelope<TResult> =>\n Object.freeze({\n cliVersion: input.cliVersion,\n command: input.command,\n error: input.error,\n result: input.result,\n schemaVersion: MOLDEA_CLI_JSON_SCHEMA_VERSION,\n status: input.status,\n });\n\n/** Serializes one schema 7 envelope, keys in RFC 8785 order, with its trailing line feed. */\nexport const serializeMoldeaCliJsonEnvelope = <TResult>(\n input: IMoldeaCliJsonDocumentInput<TResult>,\n): string =>\n `${stringifyJsonDeterministically(createMoldeaCliJsonEnvelope(input), { strict: true })}\\n`;\n\n/** Measures the exact final UTF-8 bytes of one schema 7 JSON document. */\nexport const measureMoldeaCliJsonEnvelope = <TResult>(\n input: IMoldeaCliJsonDocumentInput<TResult>,\n): number => Buffer.byteLength(serializeMoldeaCliJsonEnvelope(input), 'utf8');\n","import type { IDiagnosticEntity, IBindingCoverageCounts } from '@moldea.ai/core';\n\nimport { MOLDEA_CLI_COMMANDS, type IMoldeaCliCommand } from '../command-line/index.js';\nimport type { IMoldeaCliCompositionResult } from '../composition/index.js';\nimport {\n MOLDEA_CLI_JSON_SCHEMA_VERSION,\n serializeMoldeaCliJsonEnvelope,\n type IMoldeaCliJsonStatus,\n} from '../json-output-contract/index.js';\nimport type { IMoldeaCliContentResult } from '../project-content/index.js';\nimport type { IMoldeaCliScopeResult } from '../project-scope/index.js';\n\nimport { MOLDEA_CLI_COMMAND_HELP, MOLDEA_CLI_TOP_LEVEL_HELP } from './constants.js';\nimport type {\n IMoldeaCliDiagnosticRecord,\n IMoldeaCliError,\n IMoldeaCliInspectResult,\n IMoldeaCliValidateResult,\n} from './types.js';\n\nconst DIAGNOSTIC_ENTITY_KEYS = [\n 'agentId',\n 'capabilityKind',\n 'capabilityId',\n 'decisionId',\n 'variableId',\n 'contextPath',\n 'integrationPath',\n] as const satisfies readonly (keyof IDiagnosticEntity)[];\n\n/** Formats one diagnostic entity in the canonical Core field order. */\nconst formatMoldeaCliHumanDiagnosticEntity = (entity: IDiagnosticEntity): string =>\n DIAGNOSTIC_ENTITY_KEYS.flatMap((key) => {\n const identifier = entity[key];\n\n return identifier === undefined ? [] : [`${key}=${identifier}`];\n }).join(', ');\n\n/** Formats one projected diagnostic without exposing omitted arbitrary details. */\nconst formatMoldeaCliHumanDiagnostic = (diagnostic: IMoldeaCliDiagnosticRecord): string => {\n const location =\n diagnostic.path === null\n ? ''\n : diagnostic.range === null\n ? ` ${diagnostic.path}`\n : ` ${diagnostic.path}:${diagnostic.range.start.line}:${diagnostic.range.start.column}`;\n const lines = [`${diagnostic.source}:${diagnostic.code}${location} ${diagnostic.message}`];\n\n if (diagnostic.pointer !== null) {\n lines.push(` pointer: ${diagnostic.pointer}`);\n }\n\n if (diagnostic.entity !== null) {\n lines.push(` entity: ${formatMoldeaCliHumanDiagnosticEntity(diagnostic.entity)}`);\n }\n\n if (diagnostic.severity === 'warning') {\n lines.push(` subject: ${diagnostic.subject}`);\n if (diagnostic.qualifier !== null) lines.push(` qualifier: ${diagnostic.qualifier}`);\n }\n\n return lines.join('\\n');\n};\n\n/** Creates shared human status lines for one completed repository command. */\nconst createMoldeaCliHumanStatusLines = (\n isValid: boolean,\n formatVersion: number | null,\n warningCount = 0,\n): string[] => {\n const status = isValid ? (warningCount > 0 ? 'valid with warnings' : 'valid') : 'invalid';\n const lines = [`The moldea project is ${status}.`];\n\n if (formatVersion !== null) {\n lines.push(`Repository format: ${formatVersion}`);\n }\n\n return lines;\n};\n\n/** Formats one count label with correct singular or plural grammar. */\nconst formatMoldeaCliHumanCount = (\n count: number,\n singularLabel: string,\n pluralLabel: string,\n): string => `${count === 1 ? singularLabel : pluralLabel}: ${count}`;\n\n/** Formats top-level or command-specific help with its required trailing line feed. */\nexport const formatMoldeaCliHelp = (command: IMoldeaCliCommand | null): string => {\n return command === null ? MOLDEA_CLI_TOP_LEVEL_HELP : MOLDEA_CLI_COMMAND_HELP[command];\n};\n\n/** Formats one safe CLI error for human stderr output. */\nexport const formatMoldeaCliHumanError = (error: IMoldeaCliError): string =>\n `${error.source}:${error.code} ${error.message}\\n`;\n\n/** Formats any strict schema 7 JSON envelope. */\nexport const formatMoldeaCliJsonResult = <TResult>(\n command: IMoldeaCliCommand | null,\n result: TResult | null,\n error: IMoldeaCliError | null,\n status: IMoldeaCliJsonStatus,\n cliVersion: string,\n): string => serializeMoldeaCliJsonEnvelope({ cliVersion, command, error, result, status });\n\n/** Formats one safe schema 7 JSON error envelope. */\nexport const formatMoldeaCliJsonError = (\n error: IMoldeaCliError,\n command: IMoldeaCliCommand | null,\n cliVersion: string,\n): string => formatMoldeaCliJsonResult(command, null, error, 'error', cliVersion);\n\n/** Formats one valid composition result for human stdout. */\nexport const formatMoldeaCliHumanCompositionResult = (\n result: IMoldeaCliCompositionResult,\n cliVersion: string,\n): string => {\n const lines = [\n 'The installed CLI composition state is valid.',\n `CLI version: ${cliVersion}`,\n `Supported Node.js: ${result.supportedNodeRange}`,\n `JSON output schema: ${MOLDEA_CLI_JSON_SCHEMA_VERSION}`,\n `Minimum Git: ${result.minimumGitVersion}`,\n `Repository formats: ${result.repositoryFormatVersions.join(', ')}`,\n 'Packages:',\n ...result.packages.map(({ name, version }) => ` ${name}: ${version}`),\n ];\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one composition result in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonCompositionResult = (\n result: IMoldeaCliCompositionResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Composition, result, null, 'valid', cliVersion);\n\n/** Describes completed checks without claiming runtime wiring. */\nconst formatCoverage = (counts: IBindingCoverageCounts): string =>\n `Coverage: ${counts.bindings} bindings, ${counts.exportsPassed} exports confirmed, ${counts.exportsFailed} exports missing, ${counts.exportsNotChecked} not checked`;\n\n/** Formats one completed validation result for human stdout. */\nexport const formatMoldeaCliHumanValidateResult = (result: IMoldeaCliValidateResult): string => {\n const lines = createMoldeaCliHumanStatusLines(\n result.valid,\n result.formatVersion,\n result.warningCount,\n );\n\n lines.push(formatCoverage(result.coverageCounts));\n\n for (const record of result.page.records) {\n if (record.kind === 'diagnostic' && !(record.severity === 'warning' && record.accepted))\n lines.push(formatMoldeaCliHumanDiagnostic(record));\n }\n\n lines.push(formatMoldeaCliHumanCount(result.diagnosticCount, 'Diagnostic', 'Diagnostics'));\n lines.push(formatMoldeaCliHumanCount(result.errorCount, 'Error', 'Errors'));\n lines.push(formatMoldeaCliHumanCount(result.warningCount, 'Warning', 'Warnings'));\n lines.push(\n `${result.acceptedWarningCount} accepted ${result.acceptedWarningCount === 1 ? 'warning' : 'warnings'}`,\n );\n\n if (result.page.cursor !== null) {\n lines.push('Additional records are available through JSON pagination.');\n }\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one validation result in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonValidateResult = (\n result: IMoldeaCliValidateResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(\n MOLDEA_CLI_COMMANDS.Validate,\n result,\n null,\n result.valid ? 'valid' : 'invalid',\n cliVersion,\n );\n\n/** Formats one completed metadata inspection for human stdout. */\nexport const formatMoldeaCliHumanInspectResult = (result: IMoldeaCliInspectResult): string => {\n const lines = createMoldeaCliHumanStatusLines(\n result.valid,\n result.formatVersion,\n result.counts.warnings,\n );\n\n lines.push(formatCoverage(result.coverageCounts));\n lines.push(\n `${result.counts.acceptedWarnings} accepted ${result.counts.acceptedWarnings === 1 ? 'warning' : 'warnings'}`,\n );\n for (const record of result.page.records)\n if (record.kind === 'diagnostic' && !(record.severity === 'warning' && record.accepted))\n lines.push(formatMoldeaCliHumanDiagnostic(record));\n\n for (const [label, count] of Object.entries(result.counts)) {\n lines.push(`${label}: ${count}`);\n }\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one metadata inspection in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonInspectResult = (\n result: IMoldeaCliInspectResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(\n MOLDEA_CLI_COMMANDS.Inspect,\n result,\n null,\n result.valid ? 'valid' : 'invalid',\n cliVersion,\n );\n\n/** Formats one changed-path scope result for human stdout. */\nexport const formatMoldeaCliHumanScopeResult = (result: IMoldeaCliScopeResult): string => {\n const lines = [\n `The moldea scope result is ${result.valid ? 'valid' : 'invalid'}.`,\n `Relevant: ${result.relevant ? 'yes' : 'no'}`,\n ...Object.entries(result.counts).map(([label, count]) => `${label}: ${count}`),\n ];\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one changed-path scope result in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonScopeResult = (\n result: IMoldeaCliScopeResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(\n MOLDEA_CLI_COMMANDS.Scope,\n result,\n null,\n result.valid ? 'valid' : 'invalid',\n cliVersion,\n );\n\n/** Formats one explicit canonical content chunk for human stdout. */\nexport const formatMoldeaCliHumanContentResult = (result: IMoldeaCliContentResult): string => {\n const lines = [\n `Path: ${result.asset.path}`,\n `Content identity: ${result.asset.contentIdentity ?? 'unavailable'}`,\n `Bytes: ${result.chunk.byteStart}-${result.chunk.byteEnd} of ${result.asset.totalBytes}`,\n result.cursor === null ? 'Cursor: none' : `Cursor: ${result.cursor}`,\n ...(result.cursor === null\n ? []\n : ['Continue this asset by passing the cursor to a JSON content request.']),\n '',\n result.chunk.content,\n ];\n\n return `${lines.join('\\n')}\\n`;\n};\n\n/** Formats one explicit canonical content chunk in the strict schema 7 envelope. */\nexport const formatMoldeaCliJsonContentResult = (\n result: IMoldeaCliContentResult,\n cliVersion: string,\n): string =>\n formatMoldeaCliJsonResult(MOLDEA_CLI_COMMANDS.Content, result, null, 'valid', cliVersion);\n","import type {\n IDiagnostic,\n IBindingCoverage,\n IProjectInspectionItem,\n IProjectInspectionPageResult,\n IProjectValidationResult,\n} from '@moldea.ai/core';\n\nimport type { IJsonValue } from '../json-serialization/index.js';\nimport { calculateMoldeaCliJsonDigest } from '../output-page/index.js';\n\nimport { MOLDEA_CLI_GIT_WORKING_TREE_SOURCE } from './constants.js';\nimport type {\n IMoldeaCliAgentRecord,\n IMoldeaCliDiagnosticRecord,\n IMoldeaCliCoverageRecord,\n IMoldeaCliInspectProjection,\n IMoldeaCliInspectProjectMetadata,\n IMoldeaCliInspectRecord,\n IMoldeaCliMetadataRecord,\n IMoldeaCliValidateProjection,\n} from './types.js';\n\n/** Rejects a Core validation result whose completion fields contradict its validity. */\nconst assertProjectValidationInvariant = (validation: IProjectValidationResult): void => {\n const observedErrorCount = validation.diagnostics.filter(\n (diagnostic) => diagnostic.severity === 'error',\n ).length;\n const isConsistent =\n Number.isSafeInteger(validation.errorCount) &&\n Number.isSafeInteger(validation.warningCount) &&\n validation.errorCount === observedErrorCount &&\n validation.acceptedWarningCount ===\n validation.diagnostics.filter(\n (diagnostic) => diagnostic.severity === 'warning' && diagnostic.accepted === true,\n ).length &&\n validation.warningCount ===\n validation.diagnostics.length - observedErrorCount - validation.acceptedWarningCount &&\n validation.diagnosticCount ===\n validation.errorCount + validation.warningCount + validation.acceptedWarningCount &&\n validation.valid === (validation.summary !== null && validation.errorCount === 0) &&\n (validation.valid || validation.errorCount > 0);\n\n if (!isConsistent) {\n throw new TypeError('The Core validation result is internally inconsistent.');\n }\n};\n\n/** Creates one stable composite record key. */\nconst createRecordKey = (kind: string, ...parts: readonly unknown[]): string =>\n JSON.stringify([kind, ...parts]);\n\n/** Projects one diagnostic without retaining arbitrary detail payloads. */\nexport const createMoldeaCliDiagnosticRecord = (\n diagnostic: IDiagnostic,\n occurrence = 0,\n): IMoldeaCliDiagnosticRecord => {\n const record = {\n code: diagnostic.code,\n group: diagnostic.group,\n entity: diagnostic.entity,\n key: createRecordKey(\n 'diagnostic',\n diagnostic.source,\n diagnostic.severity,\n diagnostic.code,\n diagnostic.path,\n diagnostic.pointer,\n diagnostic.severity === 'warning'\n ? [\n diagnostic.subject,\n diagnostic.qualifier,\n diagnostic.accepted === true,\n diagnostic.accepted === true ? diagnostic.reason : null,\n ]\n : null,\n occurrence,\n ),\n kind: 'diagnostic' as const,\n message: diagnostic.message,\n path: diagnostic.path,\n pointer: diagnostic.pointer,\n range: diagnostic.range,\n source: diagnostic.source,\n };\n\n if (diagnostic.severity === 'warning') {\n return Object.freeze({\n ...record,\n severity: 'warning' as const,\n subject: diagnostic.subject,\n qualifier: diagnostic.qualifier,\n acceptable: diagnostic.acceptable,\n accepted: diagnostic.accepted === true,\n reason: diagnostic.accepted === true ? diagnostic.reason : null,\n });\n }\n\n return Object.freeze({ ...record, severity: 'error' as const });\n};\n\n/** Projects a binding's file and export checks with a stable record key. */\nconst createCoverageRecord = (\n coverage: IBindingCoverage,\n index: number,\n order = 'coverage',\n): IMoldeaCliCoverageRecord =>\n Object.freeze({\n entity: coverage.entity,\n relationship: coverage.relationship,\n path: coverage.path,\n symbol: coverage.symbol,\n fileCheck: coverage.fileCheck,\n ...(coverage.exportCheck === 'not-checked'\n ? {\n exportCheck: coverage.exportCheck,\n exportNotCheckedReason: coverage.exportNotCheckedReason,\n }\n : { exportCheck: coverage.exportCheck }),\n key: createRecordKey(\n order,\n 'coverage',\n coverage.relationship,\n coverage.entity,\n coverage.path,\n coverage.symbol,\n index,\n ),\n kind: 'coverage' as const,\n });\n\n/** Projects one bounded Core inspection item through the schema 7 allowlist. */\nconst createInspectRecord = (\n item: IProjectInspectionItem,\n index: number,\n): IMoldeaCliInspectRecord => {\n const order = index.toString().padStart(6, '0');\n\n if (item.kind === 'agent') {\n const record: IMoldeaCliAgentRecord = {\n agentId: item.agent.agentId,\n key: createRecordKey(order, 'agent', item.agent.agentId, item.agent.runtimeId),\n kind: 'agent',\n runtimeId: item.agent.runtimeId,\n };\n\n return Object.freeze(record);\n }\n\n if (item.kind === 'diagnostic') {\n return Object.freeze({\n ...createMoldeaCliDiagnosticRecord(item.diagnostic, index),\n key: createRecordKey(\n order,\n 'diagnostic',\n item.diagnostic.source,\n item.diagnostic.severity,\n item.diagnostic.code,\n createMoldeaCliDiagnosticRecord(item.diagnostic, index).key,\n ),\n });\n }\n\n if (item.kind === 'coverage') return createCoverageRecord(item.coverage, index, order);\n\n const metadata = item.metadata;\n const record: IMoldeaCliMetadataRecord = {\n agentId: metadata.agentId,\n byteLength: metadata.byteLength,\n canonicalDigest: metadata.canonicalDigest,\n decisionId: metadata.decisionId,\n digest: metadata.digest,\n key: createRecordKey(order, 'metadata', metadata.path, metadata.kind, metadata.agentId),\n kind: 'metadata',\n metadataKind: metadata.kind,\n path: metadata.path,\n scalarLength: metadata.scalarLength,\n };\n\n return Object.freeze(record);\n};\n\n/** Creates content-free validation metadata and ordered diagnostic records. */\nexport const createMoldeaCliValidateProjection = (\n validation: IProjectValidationResult,\n): IMoldeaCliValidateProjection => {\n assertProjectValidationInvariant(validation);\n const diagnostics = validation.diagnostics.map((diagnostic, index) => {\n const record = createMoldeaCliDiagnosticRecord(diagnostic, index);\n return Object.freeze({\n ...record,\n key: createRecordKey(index.toString().padStart(6, '0'), 'diagnostic', record.key),\n });\n });\n const records = Object.freeze([\n ...diagnostics,\n ...validation.coverage.map((coverage, index) =>\n createCoverageRecord(\n coverage,\n index,\n (diagnostics.length + index).toString().padStart(6, '0'),\n ),\n ),\n ]);\n const snapshotDigest = calculateMoldeaCliJsonDigest({\n records,\n coverageCounts: validation.coverageCounts,\n acceptedWarningCount: validation.acceptedWarningCount,\n errorCount: validation.errorCount,\n formatVersion: validation.formatVersion,\n summary: validation.summary,\n valid: validation.valid,\n warningCount: validation.warningCount,\n } as unknown as IJsonValue);\n\n return Object.freeze({\n records,\n diagnosticCount: validation.diagnosticCount,\n acceptedWarningCount: validation.acceptedWarningCount,\n coverageCounts: validation.coverageCounts,\n errorCount: validation.errorCount,\n formatVersion: validation.formatVersion,\n snapshotDigest,\n source: MOLDEA_CLI_GIT_WORKING_TREE_SOURCE,\n valid: validation.valid,\n warningCount: validation.warningCount,\n });\n};\n\n/** Projects one bounded Core page through the content-free schema 7 allowlist. */\nexport const createMoldeaCliInspectProjection = (\n inspection: IProjectInspectionPageResult,\n): IMoldeaCliInspectProjection => {\n const project: IMoldeaCliInspectProjectMetadata | null =\n inspection.summary === null\n ? null\n : Object.freeze({\n manifest: Object.freeze({\n digest: inspection.summary.manifestDigest,\n path: inspection.summary.manifestPath,\n }),\n project: Object.freeze({\n digest: inspection.summary.projectDigest,\n path: inspection.summary.projectPath,\n }),\n });\n const records = Object.freeze(\n inspection.page.records.map(({ item }, index) => createInspectRecord(item, index)),\n );\n const sourceCursors = new Map(\n inspection.page.records.map((record, index) => {\n const projected = records[index];\n\n if (projected === undefined) {\n throw new TypeError('A projected inspection record is missing.');\n }\n\n return [projected.key, record.nextCursor] as const;\n }),\n );\n const snapshotDigest = inspection.inspectionDigest;\n\n return Object.freeze({\n counts: inspection.counts,\n formatVersion: inspection.formatVersion,\n getSourceCursor: (record: IMoldeaCliInspectRecord): string | null =>\n sourceCursors.get(record.key) ?? null,\n project,\n records,\n snapshotDigest,\n source: MOLDEA_CLI_GIT_WORKING_TREE_SOURCE,\n coverageCounts: inspection.coverageCounts,\n valid: inspection.valid,\n view: inspection.view,\n });\n};\n","// most stderr bytes one Git command may write before its result is refused as invalid output\nexport const MAX_GIT_DIAGNOSTIC_BYTES = 4096;\n\n/*\n * Seconds one Git command may run. The CLI's read-only commands finish in seconds even for a\n * 100,000-entry repository, so the ceiling only stops a Git process that hangs, such as on a\n * stalled network file system.\n */\nexport const GIT_TIMEOUT_SECONDS = 300;\n","import { getErrorCode } from 'jg-exception';\nimport { ERRORS as PROCESS_ERRORS, type IProcessResult } from 'jg-process';\nimport { ERRORS as GIT_ERRORS, assertGitSucceeded } from 'jg-git-commands';\n\nimport { MAX_GIT_DIAGNOSTIC_BYTES } from './constants.js';\nimport type { IGitFailureReason, IGitReadResult } from './types.js';\n\n/**\n * Creates one immutable Git failure.\n * @param reason Why the command failed.\n * @param subcommand The fixed Git subcommand that failed, when the caller knows it.\n * @returns The failed read result.\n */\nexport const createGitFailure = (\n reason: IGitFailureReason,\n subcommand?: string,\n): IGitReadResult<never> =>\n Object.freeze({ kind: 'failed', reason, ...(subcommand === undefined ? {} : { subcommand }) });\n\n/**\n * Classifies one Git error by its code, without retaining its diagnostics.\n * @param error The error a Git command or read rejected with.\n * @param signal The command's cancellation signal, whose abort takes precedence.\n * @returns The failure reason.\n */\nexport const classifyGitFailure = (error: unknown, signal?: AbortSignal): IGitFailureReason => {\n if (signal?.aborted === true) {\n return 'aborted';\n }\n\n switch (getErrorCode(error)) {\n case GIT_ERRORS.GIT_NOT_FOUND:\n return 'not-found';\n case GIT_ERRORS.GIT_REPOSITORY_NOT_FOUND:\n return 'repository-not-found';\n case GIT_ERRORS.GIT_ACCESS_DENIED:\n return 'access-denied';\n case GIT_ERRORS.GIT_OUTPUT_INVALID:\n return 'output-invalid';\n case PROCESS_ERRORS.PROCESS_OUTPUT_TOO_LARGE:\n return 'output-limit-exceeded';\n case PROCESS_ERRORS.PROCESS_START_FAILED: {\n const causeCode = getErrorCode((error as { readonly cause?: unknown }).cause);\n\n return causeCode === 'EACCES' || causeCode === 'EPERM' ? 'access-denied' : 'command-failed';\n }\n default:\n return 'command-failed';\n }\n};\n\n/**\n * Runs one typed Git read and turns its rejection into a failure reason.\n * @param read The read, such as one of jg-git-commands' typed commands.\n * @param signal The read's cancellation signal.\n * @param subcommand The fixed Git subcommand the read runs, named in its failure.\n * @returns A promise resolving to the read's value, or why it failed.\n */\nexport const readGit = async <TValue>(\n read: () => Promise<TValue>,\n signal?: AbortSignal,\n subcommand?: string,\n): Promise<IGitReadResult<TValue>> => {\n try {\n return Object.freeze({ kind: 'completed', value: await read() });\n } catch (error) {\n return createGitFailure(classifyGitFailure(error, signal), subcommand);\n }\n};\n\n/**\n * Checks one finished Git command. Git exits with 0 after warning on stderr that it skipped\n * something, so any diagnostic fails a command that otherwise succeeded.\n * @param result The command's result, as bytes.\n * @param subcommand The Git subcommand that ran.\n * @returns Why the command failed, or null when it succeeded without diagnostics.\n */\nexport const checkGitResult = (\n result: IProcessResult<Buffer>,\n subcommand: string,\n): IGitFailureReason | null => {\n if (result.stderr.byteLength > MAX_GIT_DIAGNOSTIC_BYTES) {\n return 'output-invalid';\n }\n\n try {\n assertGitSucceeded(result, subcommand);\n } catch (error) {\n return classifyGitFailure(error);\n }\n\n return result.stderr.byteLength === 0 ? null : 'output-invalid';\n};\n","import { runGit } from 'jg-git-commands';\n\nimport { GIT_TIMEOUT_SECONDS } from './constants.js';\nimport type { IGitCommandRunner } from './types.js';\nimport { checkGitResult, createGitFailure, readGit } from './utilities.js';\n\n/**\n * Runs one read-only Git command through jg-git-commands, bounded by the caller's combined output\n * limit and the CLI's timeout, and refuses any stderr. A failure names the subcommand.\n * @param args The command's trusted arguments, its subcommand first.\n * @param options The working directory, output limit, stdin, and cancellation.\n * @returns A promise resolving to the command's stdout, or why it failed.\n */\nexport const runGitCommand: IGitCommandRunner = async (\n args,\n { cwd, input, maxOutputBytes, signal },\n) => {\n const subcommand = args[0];\n const execution = await readGit(\n () =>\n runGit(args, {\n cwd,\n encoding: 'buffer',\n maxOutputBytes,\n timeoutSeconds: GIT_TIMEOUT_SECONDS,\n ...(input === undefined ? {} : { input }),\n ...(signal === undefined ? {} : { signal }),\n }),\n signal,\n subcommand,\n );\n\n if (execution.kind === 'failed') {\n return execution;\n }\n\n const reason = checkGitResult(execution.value, subcommand ?? '');\n\n return reason === null\n ? Object.freeze({ kind: 'completed', value: execution.value.stdout })\n : createGitFailure(reason, subcommand);\n};\n","// numeric components of the oldest Git version supported by the CLI\nexport const MINIMUM_GIT_VERSION_COMPONENTS = Object.freeze({\n major: 2,\n minor: 32,\n patch: 0,\n});\n\n// oldest Git version supported by the CLI\nexport const MINIMUM_GIT_VERSION = `${MINIMUM_GIT_VERSION_COMPONENTS.major}.${MINIMUM_GIT_VERSION_COMPONENTS.minor}.${MINIMUM_GIT_VERSION_COMPONENTS.patch}`;\n\n// most bytes the Git version command's stdout and stderr may take together\nexport const MAX_GIT_VERSION_OUTPUT_BYTES = 4096;\n","import { readGitVersion } from 'jg-git-commands';\n\nimport { GIT_TIMEOUT_SECONDS, readGit, type IGitFailureReason } from '../git-command/index.js';\nimport type { IMoldeaCliGitErrorCode } from '../presentation/index.js';\n\nimport { MAX_GIT_VERSION_OUTPUT_BYTES, MINIMUM_GIT_VERSION_COMPONENTS } from './constants.js';\nimport type {\n IGitVersion,\n IGitVersionPreflight,\n IGitVersionPreflightResult,\n IGitVersionReader,\n} from './types.js';\n\n/**\n * Maps Git failures to stable safe CLI errors.\n * @param reason The normalized Git failure reason.\n * @returns The public Git error code.\n */\nconst mapGitFailure = (reason: IGitFailureReason): IMoldeaCliGitErrorCode => {\n switch (reason) {\n case 'aborted':\n return 'GIT_OPERATION_ABORTED';\n case 'not-found':\n return 'GIT_NOT_FOUND';\n case 'access-denied':\n return 'GIT_ACCESS_DENIED';\n case 'output-limit-exceeded':\n case 'output-invalid':\n return 'GIT_VERSION_INVALID';\n case 'repository-not-found':\n case 'command-failed':\n return 'GIT_COMMAND_FAILED';\n }\n};\n\n/**\n * Determines whether a parsed Git version meets the supported minimum.\n * @param version The parsed Git version.\n * @returns Whether the numeric version is supported.\n */\nconst isGitVersionSupported = (version: IGitVersion): boolean => {\n if (version.major !== MINIMUM_GIT_VERSION_COMPONENTS.major) {\n return version.major > MINIMUM_GIT_VERSION_COMPONENTS.major;\n }\n\n if (version.minor !== MINIMUM_GIT_VERSION_COMPONENTS.minor) {\n return version.minor > MINIMUM_GIT_VERSION_COMPONENTS.minor;\n }\n\n return version.patch >= MINIMUM_GIT_VERSION_COMPONENTS.patch;\n};\n\n/**\n * Creates a Git prerequisite check around an injectable typed version read.\n * @param readVersion The installed Git version read.\n * @returns A preflight that validates the installed Git version.\n */\nexport const createGitVersionPreflight =\n (readVersion: IGitVersionReader = readGitVersion): IGitVersionPreflight =>\n async (directory, signal): Promise<IGitVersionPreflightResult> => {\n const versionResult = await readGit(\n () =>\n readVersion(directory, {\n maxOutputBytes: MAX_GIT_VERSION_OUTPUT_BYTES,\n timeoutSeconds: GIT_TIMEOUT_SECONDS,\n ...(signal === undefined ? {} : { signal }),\n }),\n signal,\n );\n\n if (versionResult.kind === 'failed') {\n return Object.freeze({ errorCode: mapGitFailure(versionResult.reason), kind: 'failed' });\n }\n\n if (!isGitVersionSupported(versionResult.value)) {\n return Object.freeze({ errorCode: 'GIT_VERSION_UNSUPPORTED', kind: 'failed' });\n }\n\n return Object.freeze({ kind: 'supported', version: Object.freeze({ ...versionResult.value }) });\n };\n","import { createMoldeaCliOwnedError } from '../presentation/index.js';\n\n/** Represents an inconsistent installed executable composition. */\nexport class MoldeaCliCompositionException extends Error {\n public readonly code = 'COMPOSITION_STATE_INVALID';\n\n /** Uses the canonical CLI-owned composition failure message. */\n public constructor() {\n super(createMoldeaCliOwnedError('COMPOSITION_STATE_INVALID').message);\n this.name = 'MoldeaCliCompositionException';\n }\n}\n","'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numeric identifiers include numeric identifiers but can be longer.\n// Therefore non-numeric identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifier, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a === b ? 0 : a < b ? -1 : 1\n }\n\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\n\nconst isPrereleaseIdentifier = (prerelease, identifier) => {\n const identifiers = identifier.split('.')\n if (identifiers.length > prerelease.length) {\n return false\n }\n\n for (let i = 0; i < identifiers.length; i++) {\n if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {\n return false\n }\n }\n\n return true\n}\n\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n if (this.major < other.major) {\n return -1\n }\n if (this.major > other.major) {\n return 1\n }\n if (this.minor < other.minor) {\n return -1\n }\n if (this.minor > other.minor) {\n return 1\n }\n if (this.patch < other.patch) {\n return -1\n }\n if (this.patch > other.patch) {\n return 1\n }\n return 0\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (isPrereleaseIdentifier(this.prerelease, identifier)) {\n const prereleaseBase = this.prerelease[identifier.split('.').length]\n if (isNaN(prereleaseBase)) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are prereleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","'use strict'\n\nconst parse = require('./parse')\nconst constants = require('../internal/constants')\nconst SemVer = require('../classes/semver')\n\nconst truncate = (version, truncation, options) => {\n if (!constants.RELEASE_TYPES.includes(truncation)) {\n return null\n }\n\n const clonedVersion = cloneInputVersion(version, options)\n return clonedVersion && doTruncation(clonedVersion, truncation)\n}\n\nconst cloneInputVersion = (version, options) => {\n const versionStringToParse = (\n version instanceof SemVer ? version.version : version\n )\n\n return parse(versionStringToParse, options)\n}\n\nconst doTruncation = (version, truncation) => {\n if (isPrerelease(truncation)) {\n return version.version\n }\n\n version.prerelease = []\n\n switch (truncation) {\n case 'major':\n version.minor = 0\n version.patch = 0\n break\n case 'minor':\n version.patch = 0\n break\n }\n\n return version.format()\n}\n\nconst isPrerelease = (type) => {\n return type.startsWith('pre')\n}\n\nmodule.exports = truncate\n","'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // strip build metadata so it can't bleed into the version\n range = range.replace(BUILDSTRIPRE, '')\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n src,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\n// unbounded global build-metadata stripper used by parseRange\nconst BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n comp = comp.replace(re[t.BUILD], '')\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\nconst invalidXRangeOrder = (M, m, p) => (\n (isX(M) && !isX(m)) ||\n (isX(m) && p && !isX(p))\n)\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n // if we're including prereleases in the match, then the lower bound is\n // -0, the lowest possible prerelease value, just like x-ranges and carets.\n // this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n if (invalidXRangeOrder(M, m, p)) {\n return comp\n }\n\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If LT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !c.test(gt.semver)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !c.test(lt.semver)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst truncate = require('./functions/truncate')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n truncate,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","// exact first-class package identities required by every CLI release\nexport const MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES = Object.freeze([\n '@moldea.ai/core',\n '@moldea.ai/repository',\n '@moldea.ai/repository-fs',\n] as const);\n\n// compatible first-class package lines this CLI release accepts\nexport const MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES = Object.freeze({\n '@moldea.ai/core': '^9.1.1',\n '@moldea.ai/repository': '^4.0.0',\n '@moldea.ai/repository-fs': '^4.0.0',\n} as const);\n","import { satisfies as doesVersionSatisfy, valid as isValidVersion, validRange } from 'semver';\n\nimport {\n MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES,\n MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES,\n} from './constants.js';\nimport type { IMoldeaCliCompositionStateInput } from './types.js';\n\nconst hasExactStringSet = (left: readonly string[], right: readonly string[]): boolean => {\n if (\n left.length !== right.length ||\n new Set(left).size !== left.length ||\n new Set(right).size !== right.length\n ) {\n return false;\n }\n\n const rightValues = new Set(right);\n return left.every((entry) => rightValues.has(entry));\n};\n\nconst hasUniquePositiveIntegers = (entries: readonly number[]): boolean =>\n entries.length > 0 &&\n entries.every((entry) => Number.isSafeInteger(entry) && entry > 0) &&\n new Set(entries).size === entries.length;\n\n/**\n * Verifies the installed package manifest and resolved package composition.\n * @param input The installed package, Core, Git, and JSON-schema state.\n * @returns Whether every runtime composition invariant is satisfied.\n */\nexport const isMoldeaCliCompositionStateValid = (\n input: IMoldeaCliCompositionStateInput,\n): boolean => {\n const { dependencies, installedPackageVersions, supportedNodeRange, version } =\n input.packageMetadata;\n\n if (\n isValidVersion(version) === null ||\n supportedNodeRange === null ||\n validRange(supportedNodeRange) === null ||\n isValidVersion(input.minimumGitVersion) === null ||\n input.outputSchemaVersion !== 7 ||\n dependencies === null ||\n installedPackageVersions === null ||\n !hasUniquePositiveIntegers(input.coreSupportedRepositoryFormatVersions)\n ) {\n return false;\n }\n\n const expectedPackageNames = [...MOLDEA_CLI_FOUNDATIONAL_PACKAGE_NAMES];\n const declaredPackageNames = Object.keys(dependencies).filter((packageName) =>\n packageName.startsWith('@moldea.ai/'),\n );\n const resolvedPackageNames = Object.keys(installedPackageVersions);\n\n if (\n !hasExactStringSet(declaredPackageNames, expectedPackageNames) ||\n !hasExactStringSet(resolvedPackageNames, expectedPackageNames)\n ) {\n return false;\n }\n\n return expectedPackageNames.every((packageName) => {\n const resolvedVersion = installedPackageVersions[packageName];\n const declaredRange = dependencies[packageName];\n const supportedRange = MOLDEA_CLI_FIRST_CLASS_PACKAGE_RANGES[packageName];\n\n return (\n resolvedVersion !== undefined &&\n isValidVersion(resolvedVersion) !== null &&\n supportedRange !== undefined &&\n (declaredRange === supportedRange || declaredRange === `workspace:${supportedRange}`) &&\n doesVersionSatisfy(resolvedVersion, supportedRange)\n );\n });\n};\n","import { deepFreeze } from 'jg-utilities';\n\nimport type { IMoldeaCliCompositionResult, IMoldeaCliCompositionStateInput } from './types.js';\n\nconst compareIdentifiers = (left: string, right: string): number =>\n left < right ? -1 : left > right ? 1 : 0;\n\n/**\n * Creates the compact immutable composition result from validated installed state.\n * @param input The already validated installed and executable composition.\n * @returns A deeply immutable composition result in deterministic report order.\n */\nexport const createMoldeaCliCompositionResult = (\n input: IMoldeaCliCompositionStateInput,\n): IMoldeaCliCompositionResult => {\n const packages = Object.entries(input.packageMetadata.installedPackageVersions ?? {})\n .map(([name, version]) => ({ name, version }))\n .sort((left, right) => compareIdentifiers(left.name, right.name));\n\n return deepFreeze({\n minimumGitVersion: input.minimumGitVersion,\n packages,\n repositoryFormatVersions: [...input.coreSupportedRepositoryFormatVersions].sort(\n (left, right) => left - right,\n ),\n supportedNodeRange: input.packageMetadata.supportedNodeRange ?? '',\n });\n};\n","import { SUPPORTED_REPOSITORY_FORMAT_VERSIONS } from '@moldea.ai/core';\n\nimport { MINIMUM_GIT_VERSION } from '../git-version/index.js';\nimport { MOLDEA_CLI_JSON_SCHEMA_VERSION } from '../json-output-contract/index.js';\n\nimport { createMoldeaCliCompositionResult } from './transformers.js';\nimport type {\n IMoldeaCliCompositionResolution,\n IMoldeaCliCompositionStateInput,\n IMoldeaCliInstalledCompositionInput,\n} from './types.js';\nimport { isMoldeaCliCompositionStateValid } from './validations.js';\n\nconst INVALID_COMPOSITION_RESOLUTION = Object.freeze({ kind: 'invalid' as const });\n\n/**\n * Resolves one explicit runtime composition without emitting a partial composition result.\n * @param input The installed and actual runtime state to compare.\n * @returns A valid immutable result or the single invalid-state outcome.\n */\nexport const resolveMoldeaCliComposition = (\n input: IMoldeaCliCompositionStateInput,\n): IMoldeaCliCompositionResolution => {\n try {\n if (!isMoldeaCliCompositionStateValid(input)) {\n return INVALID_COMPOSITION_RESOLUTION;\n }\n\n return Object.freeze({\n kind: 'valid',\n result: createMoldeaCliCompositionResult(input),\n });\n } catch {\n return INVALID_COMPOSITION_RESOLUTION;\n }\n};\n\n/**\n * Checks installed package metadata and resolved first-class package identities.\n * @param input The installed package metadata.\n * @returns A valid immutable result or the single invalid-state outcome.\n */\nexport const resolveInstalledMoldeaCliComposition = (\n input: IMoldeaCliInstalledCompositionInput,\n): IMoldeaCliCompositionResolution =>\n resolveMoldeaCliComposition({\n coreSupportedRepositoryFormatVersions: SUPPORTED_REPOSITORY_FORMAT_VERSIONS,\n minimumGitVersion: MINIMUM_GIT_VERSION,\n outputSchemaVersion: MOLDEA_CLI_JSON_SCHEMA_VERSION,\n packageMetadata: input.packageMetadata,\n });\n"],"x_google_ignoreList":[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63],"mappings":";;;;;;;;;;;;AACA,IAAa,sBAAsB;CACjC,aAAa;CACb,SAAS;CACT,SAAS;CACT,OAAO;CACP,UAAU;AACZ;AAGA,IAAa,qBAAqB;CAChC,MAAM;CACN,MAAM;CACN,QAAQ;CACR,gBAAgB;CAChB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,kBAAkB;CAClB,gBAAgB;CAChB,eAAe;CACf,SAAS;CACT,MAAM;CACN,YAAY;CACZ,YAAY;CACZ,SAAS;AACX;AAGA,IAAa,qCAAqC,OAAO,OAAO;CAC9D,gBAAgB;CAChB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,kBAAkB;CAClB,eAAe;AACjB,CAAC;AClCD,IAAa,kCAAkC;;;;ACC/C,IAAa,+BAAb,cAAkD,MAAM;CACtD;;CAGA,YAAmB,MAAqC;EACtD,MAAM,IAAI;EACV,KAAK,OAAO;EAC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ClB,kBAAkB,kBAAkB,kBAAkB,aAAa,sBAAA,GACpE,cAAA,UAAA,CAAmB,iBAAiB,cAAc;CAEtD,CAAC;AACH;;;ACxEA,IAAM,sBAAsB,MAAc,UACxC,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;;;;;;AAOzC,IAAa,oCACX,UACgC;CAChC,MAAM,WAAW,OAAO,QAAQ,MAAM,gBAAgB,4BAA4B,CAAC,CAAC,CAAC,CAClF,KAAK,CAAC,MAAM,cAAc;EAAE;EAAM;CAAQ,EAAE,CAAC,CAC7C,MAAM,MAAM,UAAU,mBAAmB,KAAK,MAAM,MAAM,IAAI,CAAC;CAElE,OAAO,WAAW;EAChB,mBAAmB,MAAM;EACzB;EACA,0BAA0B,CAAC,GAAG,MAAM,qCAAqC,CAAC,CAAC,MACxE,MAAM,UAAU,OAAO,KAC1B;EACA,oBAAoB,MAAM,gBAAgB,sBAAsB;CAClE,CAAC;AACH;;;ACdA,IAAM,iCAAiC,OAAO,OAAO,EAAE,MAAM,UAAmB,CAAC;;;;;;AAOjF,IAAa,+BACX,UACoC;CACpC,IAAI;EACF,IAAI,CAAC,iCAAiC,KAAK,GACzC,OAAO;EAGT,OAAO,OAAO,OAAO;GACnB,MAAM;GACN,QAAQ,iCAAiC,KAAK;EAChD,CAAC;CACH,QAAQ;EACN,OAAO;CACT;AACF;;;;;;AAOA,IAAa,wCACX,UAEA,4BAA4B;CAC1B,uCAAuC;CACvC,mBAAmB;CACnB,qBAAA;CACA,iBAAiB,MAAM;AACzB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as resolveInstalledMoldeaCliComposition } from "./composition-C9TNzN2e.js";
2
+ import { t as resolveInstalledMoldeaCliComposition } from "./composition-BNE2Fn_6.js";
3
3
  export { resolveInstalledMoldeaCliComposition };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { o as MoldeaCliCompositionException, t as resolveInstalledMoldeaCliComposition } from "./composition-C9TNzN2e.js";
2
+ import { o as MoldeaCliCompositionException, t as resolveInstalledMoldeaCliComposition } from "./composition-BNE2Fn_6.js";
3
3
  import { createNodeProjectInspection } from "@moldea.ai/core/node";
4
4
  //#region src/core-composition/executor.ts
5
5
  var calculateRetainedByteLimit = (maxTotalBytes) => maxTotalBytes > Math.floor(Number.MAX_SAFE_INTEGER / 4) ? Number.MAX_SAFE_INTEGER : maxTotalBytes * 4;
@@ -91,4 +91,4 @@ var executeMoldeaCliCoreInspection = createMoldeaCliCoreInspectionExecutor();
91
91
  //#endregion
92
92
  export { executeMoldeaCliCoreInspection };
93
93
 
94
- //# sourceMappingURL=core-composition-DeWcE7Bf.js.map
94
+ //# sourceMappingURL=core-composition-CJkwbKa4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-composition-DeWcE7Bf.js","names":[],"sources":["../../src/core-composition/executor.ts"],"sourcesContent":["import type { IDiagnostic, IProjectValidationResult, IBindingCoverage } from '@moldea.ai/core';\nimport { createNodeProjectInspection } from '@moldea.ai/core/node';\n\nimport {\n MoldeaCliCompositionException,\n resolveInstalledMoldeaCliComposition,\n} from '../composition/index.js';\n\nimport type { IMoldeaCliCoreInspectionExecutor, IMoldeaCliNodeInspectionFactory } from './types.js';\n\nconst calculateRetainedByteLimit = (maxTotalBytes: number): number =>\n maxTotalBytes > Math.floor(Number.MAX_SAFE_INTEGER / 4)\n ? Number.MAX_SAFE_INTEGER\n : maxTotalBytes * 4;\n\n/**\n * Creates one isolated inspection per snapshot attempt, with no in-process fallback.\n * @param nodeInspectionFactory The supervised Node inspection boundary.\n * @returns An executor that disposes its worker before returning any successful result.\n */\nexport const createMoldeaCliCoreInspectionExecutor =\n (\n nodeInspectionFactory: IMoldeaCliNodeInspectionFactory = createNodeProjectInspection,\n ): IMoldeaCliCoreInspectionExecutor =>\n async (input) => {\n const inspection = await nodeInspectionFactory({\n repository: input.repository,\n ...(input.instructions === undefined ? {} : { instructions: input.instructions }),\n limits: {\n maxDiagnostics: input.resourceLimits.maxDiagnostics,\n maxEntries: input.resourceLimits.maxEntries,\n maxCoverage: input.resourceLimits.maxCoverage,\n maxFileBytes: input.resourceLimits.maxFileBytes,\n maxManifestBytes: input.resourceLimits.maxManifestBytes,\n maxRetainedBytes: calculateRetainedByteLimit(input.resourceLimits.maxTotalBytes),\n maxTotalBytesRead: input.resourceLimits.maxTotalBytes,\n },\n ...(input.signal === undefined ? {} : { signal: input.signal }),\n });\n try {\n if (\n resolveInstalledMoldeaCliComposition({\n packageMetadata: input.packageMetadata,\n }).kind === 'invalid'\n )\n throw new MoldeaCliCompositionException();\n if (input.command === 'inspect')\n return await inspection.readPage({\n ...(input.cursor === undefined ? {} : { cursor: input.cursor }),\n maxItems: Math.min(256, input.resourceLimits.maxEntries),\n view: 'all',\n });\n const diagnostics: IDiagnostic[] = [];\n const coverage: IBindingCoverage[] = [];\n for (const view of ['diagnostics', 'coverage'] as const) {\n let cursor: string | undefined;\n do {\n const result = await inspection.readPage({\n view,\n maxItems: Math.min(256, input.resourceLimits.maxEntries),\n ...(cursor === undefined ? {} : { cursor }),\n });\n for (const { item } of result.page.records) {\n if (item.kind === 'diagnostic') diagnostics.push(item.diagnostic);\n else if (item.kind === 'coverage') coverage.push(item.coverage);\n }\n cursor = result.page.nextCursor ?? undefined;\n } while (cursor !== undefined);\n }\n return Object.freeze({\n diagnostics: Object.freeze(diagnostics),\n coverage: Object.freeze(coverage),\n coverageCounts: inspection.coverageCounts,\n diagnosticCount: inspection.counts.diagnostics,\n acceptedWarningCount: inspection.counts.acceptedWarnings,\n errorCount: inspection.counts.errors,\n warningCount: inspection.counts.warnings,\n valid: inspection.valid,\n formatVersion: inspection.formatVersion,\n source: inspection.source,\n summary: inspection.summary,\n } satisfies IProjectValidationResult);\n } finally {\n await inspection.dispose();\n }\n };\n\n/**\n * Executes one project inspection through the isolated CLI-configured Node boundary.\n * @returns A promise resolving to Core's complete immutable inspection result.\n * @throws\n * - INVALID_RESOURCE_LIMIT: A Core resource limit is invalid.\n * - INVALID_ARGUMENT: The Core operation received an invalid argument.\n * - INVALID_REPOSITORY_PATH: The repository path is invalid.\n * - ENTRY_NOT_FOUND: The requested repository entry was not found.\n * - ENTRY_NOT_FILE: The requested repository entry is not a file.\n * - ENTRY_NOT_DIRECTORY: The requested repository entry is not a directory.\n * - INVALID_PAGE_REQUEST: The repository page request is invalid.\n * - ACCESS_DENIED: Access to the repository source was denied.\n * - SOURCE_UNAVAILABLE: The repository source is unavailable.\n * - SNAPSHOT_CHANGED: The repository snapshot changed during the operation.\n * - PROVIDER_INCOMPLETE: The repository provider cannot expose a complete result.\n * - INVALID_SOURCE_DATA: The repository source returned invalid data.\n * - RESOURCE_LIMIT_EXCEEDED: A named repository resource limit was exceeded.\n * - RESOURCE_LIMIT_EXCEEDED: A Core resource limit was exceeded.\n * - ABORTED: The repository operation was aborted.\n * - ABORTED: The Core operation was aborted.\n * - INSPECTION_BUSY: Project inspection capacity is busy. Try again shortly.\n * - INSPECTION_TIMEOUT: The isolated project inspection timed out.\n * - INSPECTION_PROCESS_FAILED: The isolated project inspection failed.\n * - COMPOSITION_STATE_INVALID: The installed composition state is invalid.\n */\nexport const executeMoldeaCliCoreInspection = createMoldeaCliCoreInspectionExecutor();\n"],"mappings":";;;;AAUA,IAAM,8BAA8B,kBAClC,gBAAgB,KAAK,MAAM,OAAO,mBAAmB,CAAC,IAClD,OAAO,mBACP,gBAAgB;;;;;;AAOtB,IAAa,yCAET,wBAAyD,gCAE3D,OAAO,UAAU;CACf,MAAM,aAAa,MAAM,sBAAsB;EAC7C,YAAY,MAAM;EAClB,GAAI,MAAM,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,MAAM,aAAa;EAC/E,QAAQ;GACN,gBAAgB,MAAM,eAAe;GACrC,YAAY,MAAM,eAAe;GACjC,aAAa,MAAM,eAAe;GAClC,cAAc,MAAM,eAAe;GACnC,kBAAkB,MAAM,eAAe;GACvC,kBAAkB,2BAA2B,MAAM,eAAe,aAAa;GAC/E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R,MAAM,WAAW,QAAQ;CAC3B;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BF,IAAa,iCAAiC,sCAAsC"}
1
+ {"version":3,"file":"core-composition-CJkwbKa4.js","names":[],"sources":["../../src/core-composition/executor.ts"],"sourcesContent":["import type { IDiagnostic, IProjectValidationResult, IBindingCoverage } from '@moldea.ai/core';\nimport { createNodeProjectInspection } from '@moldea.ai/core/node';\n\nimport {\n MoldeaCliCompositionException,\n resolveInstalledMoldeaCliComposition,\n} from '../composition/index.js';\n\nimport type { IMoldeaCliCoreInspectionExecutor, IMoldeaCliNodeInspectionFactory } from './types.js';\n\nconst calculateRetainedByteLimit = (maxTotalBytes: number): number =>\n maxTotalBytes > Math.floor(Number.MAX_SAFE_INTEGER / 4)\n ? Number.MAX_SAFE_INTEGER\n : maxTotalBytes * 4;\n\n/**\n * Creates one isolated inspection per snapshot attempt, with no in-process fallback.\n * @param nodeInspectionFactory The supervised Node inspection boundary.\n * @returns An executor that disposes its worker before returning any successful result.\n */\nexport const createMoldeaCliCoreInspectionExecutor =\n (\n nodeInspectionFactory: IMoldeaCliNodeInspectionFactory = createNodeProjectInspection,\n ): IMoldeaCliCoreInspectionExecutor =>\n async (input) => {\n const inspection = await nodeInspectionFactory({\n repository: input.repository,\n ...(input.instructions === undefined ? {} : { instructions: input.instructions }),\n limits: {\n maxDiagnostics: input.resourceLimits.maxDiagnostics,\n maxEntries: input.resourceLimits.maxEntries,\n maxCoverage: input.resourceLimits.maxCoverage,\n maxFileBytes: input.resourceLimits.maxFileBytes,\n maxManifestBytes: input.resourceLimits.maxManifestBytes,\n maxRetainedBytes: calculateRetainedByteLimit(input.resourceLimits.maxTotalBytes),\n maxTotalBytesRead: input.resourceLimits.maxTotalBytes,\n },\n ...(input.signal === undefined ? {} : { signal: input.signal }),\n });\n try {\n if (\n resolveInstalledMoldeaCliComposition({\n packageMetadata: input.packageMetadata,\n }).kind === 'invalid'\n )\n throw new MoldeaCliCompositionException();\n if (input.command === 'inspect')\n return await inspection.readPage({\n ...(input.cursor === undefined ? {} : { cursor: input.cursor }),\n maxItems: Math.min(256, input.resourceLimits.maxEntries),\n view: 'all',\n });\n const diagnostics: IDiagnostic[] = [];\n const coverage: IBindingCoverage[] = [];\n for (const view of ['diagnostics', 'coverage'] as const) {\n let cursor: string | undefined;\n do {\n const result = await inspection.readPage({\n view,\n maxItems: Math.min(256, input.resourceLimits.maxEntries),\n ...(cursor === undefined ? {} : { cursor }),\n });\n for (const { item } of result.page.records) {\n if (item.kind === 'diagnostic') diagnostics.push(item.diagnostic);\n else if (item.kind === 'coverage') coverage.push(item.coverage);\n }\n cursor = result.page.nextCursor ?? undefined;\n } while (cursor !== undefined);\n }\n return Object.freeze({\n diagnostics: Object.freeze(diagnostics),\n coverage: Object.freeze(coverage),\n coverageCounts: inspection.coverageCounts,\n diagnosticCount: inspection.counts.diagnostics,\n acceptedWarningCount: inspection.counts.acceptedWarnings,\n errorCount: inspection.counts.errors,\n warningCount: inspection.counts.warnings,\n valid: inspection.valid,\n formatVersion: inspection.formatVersion,\n source: inspection.source,\n summary: inspection.summary,\n } satisfies IProjectValidationResult);\n } finally {\n await inspection.dispose();\n }\n };\n\n/**\n * Executes one project inspection through the isolated CLI-configured Node boundary.\n * @returns A promise resolving to Core's complete immutable inspection result.\n * @throws\n * - INVALID_RESOURCE_LIMIT: A Core resource limit is invalid.\n * - INVALID_ARGUMENT: The Core operation received an invalid argument.\n * - INVALID_REPOSITORY_PATH: The repository path is invalid.\n * - ENTRY_NOT_FOUND: The requested repository entry was not found.\n * - ENTRY_NOT_FILE: The requested repository entry is not a file.\n * - ENTRY_NOT_DIRECTORY: The requested repository entry is not a directory.\n * - INVALID_PAGE_REQUEST: The repository page request is invalid.\n * - ACCESS_DENIED: Access to the repository source was denied.\n * - SOURCE_UNAVAILABLE: The repository source is unavailable.\n * - SNAPSHOT_CHANGED: The repository snapshot changed during the operation.\n * - PROVIDER_INCOMPLETE: The repository provider cannot expose a complete result.\n * - INVALID_SOURCE_DATA: The repository source returned invalid data.\n * - RESOURCE_LIMIT_EXCEEDED: A named repository resource limit was exceeded.\n * - RESOURCE_LIMIT_EXCEEDED: A Core resource limit was exceeded.\n * - ABORTED: The repository operation was aborted.\n * - ABORTED: The Core operation was aborted.\n * - INSPECTION_BUSY: Project inspection capacity is busy. Try again shortly.\n * - INSPECTION_TIMEOUT: The isolated project inspection timed out.\n * - INSPECTION_PROCESS_FAILED: The isolated project inspection failed.\n * - COMPOSITION_STATE_INVALID: The installed composition state is invalid.\n */\nexport const executeMoldeaCliCoreInspection = createMoldeaCliCoreInspectionExecutor();\n"],"mappings":";;;;AAUA,IAAM,8BAA8B,kBAClC,gBAAgB,KAAK,MAAM,OAAO,mBAAmB,CAAC,IAClD,OAAO,mBACP,gBAAgB;;;;;;AAOtB,IAAa,yCAET,wBAAyD,gCAE3D,OAAO,UAAU;CACf,MAAM,aAAa,MAAM,sBAAsB;EAC7C,YAAY,MAAM;EAClB,GAAI,MAAM,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,MAAM,aAAa;EAC/E,QAAQ;GACN,gBAAgB,MAAM,eAAe;GACrC,YAAY,MAAM,eAAe;GACjC,aAAa,MAAM,eAAe;GAClC,cAAc,MAAM,eAAe;GACnC,kBAAkB,MAAM,eAAe;GACvC,kBAAkB,2BAA2B,MAAM,eAAe,aAAa;GAC/E,mBAAmB,MAAM,eAAe;EAC1C;EACA,GAAI,MAAM,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,QAAQ,MAAM,OAAO;CAC/D,CAAC;CACD,IAAI;EACF,IACE,qCAAqC,EACnC,iBAAiB,MAAM,gBACzB,CAAC,CAAC,CAAC,SAAS,WAEZ,MAAM,IAAI,8BAA8B;EAC1C,IAAI,MAAM,YAAY,WACpB,OAAO,MAAM,WAAW,SAAS;GAC/B,GAAI,MAAM,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,QAAQ,MAAM,OAAO;GAC7D,UAAU,KAAK,IAAI,KAAK,MAAM,eAAe,UAAU;GACvD,MAAM;EACR,CAAC;EACH,MAAM,cAA6B,CAAC;EACpC,MAAM,WAA+B,CAAC;EACtC,KAAK,MAAM,QAAQ,CAAC,eAAe,UAAU,GAAY;GACvD,IAAI;GACJ,GAAG;IACD,MAAM,SAAS,MAAM,WAAW,SAAS;KACvC;KACA,UAAU,KAAK,IAAI,KAAK,MAAM,eAAe,UAAU;KACvD,GAAI,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,OAAO;IAC3C,CAAC;IACD,KAAK,MAAM,EAAE,UAAU,OAAO,KAAK,SACjC,IAAI,KAAK,SAAS,cAAc,YAAY,KAAK,KAAK,UAAU;SAC3D,IAAI,KAAK,SAAS,YAAY,SAAS,KAAK,KAAK,QAAQ;IAEhE,SAAS,OAAO,KAAK,cAAc,KAAA;GACrC,SAAS,WAAW,KAAA;EACtB;EACA,OAAO,OAAO,OAAO;GACnB,aAAa,OAAO,OAAO,WAAW;GACtC,UAAU,OAAO,OAAO,QAAQ;GAChC,gBAAgB,WAAW;GAC3B,iBAAiB,WAAW,OAAO;GACnC,sBAAsB,WAAW,OAAO;GACxC,YAAY,WAAW,OAAO;GAC9B,cAAc,WAAW,OAAO;GAChC,OAAO,WAAW;GAClB,eAAe,WAAW;GAC1B,QAAQ,WAAW;GACnB,SAAS,WAAW;EACtB,CAAoC;CACtC,UAAU;EACR,MAAM,WAAW,QAAQ;CAC3B;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BF,IAAa,iCAAiC,sCAAsC"}
package/dist/moldea.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { A as createMoldeaCliOutputPage, C as formatMoldeaCliJsonInspectResult, D as MOLDEA_CLI_GIT_WORKING_TREE_SOURCE, E as createMoldeaCliOwnedError, F as MOLDEA_CLI_COMMANDS, M as decodeMoldeaCliCursor, N as encodeMoldeaCliCursor, O as parseMoldeaCliArguments, P as MoldeaCliOutputPageException, S as formatMoldeaCliJsonError, T as formatMoldeaCliJsonValidateResult, _ as formatMoldeaCliHumanInspectResult, a as require_semver, b as formatMoldeaCliJsonCompositionResult, c as runGitCommand, d as createMoldeaCliInspectProjection, f as createMoldeaCliValidateProjection, g as formatMoldeaCliHumanError, h as formatMoldeaCliHumanContentResult, j as calculateMoldeaCliJsonDigest, k as isRepositoryDirectoryInputValid, l as readGit, m as formatMoldeaCliHumanCompositionResult, o as MoldeaCliCompositionException, p as formatMoldeaCliHelp, s as createGitVersionPreflight, u as createMoldeaCliDiagnosticRecord, v as formatMoldeaCliHumanScopeResult, w as formatMoldeaCliJsonScopeResult, x as formatMoldeaCliJsonContentResult, y as formatMoldeaCliHumanValidateResult } from "./chunks/composition-C9TNzN2e.js";
2
+ import { A as createMoldeaCliOutputPage, C as formatMoldeaCliJsonInspectResult, D as MOLDEA_CLI_GIT_WORKING_TREE_SOURCE, E as createMoldeaCliOwnedError, F as MOLDEA_CLI_COMMANDS, M as decodeMoldeaCliCursor, N as encodeMoldeaCliCursor, O as parseMoldeaCliArguments, P as MoldeaCliOutputPageException, S as formatMoldeaCliJsonError, T as formatMoldeaCliJsonValidateResult, _ as formatMoldeaCliHumanInspectResult, a as require_semver, b as formatMoldeaCliJsonCompositionResult, c as runGitCommand, d as createMoldeaCliInspectProjection, f as createMoldeaCliValidateProjection, g as formatMoldeaCliHumanError, h as formatMoldeaCliHumanContentResult, j as calculateMoldeaCliJsonDigest, k as isRepositoryDirectoryInputValid, l as readGit, m as formatMoldeaCliHumanCompositionResult, o as MoldeaCliCompositionException, p as formatMoldeaCliHelp, s as createGitVersionPreflight, u as createMoldeaCliDiagnosticRecord, v as formatMoldeaCliHumanScopeResult, w as formatMoldeaCliJsonScopeResult, x as formatMoldeaCliJsonContentResult, y as formatMoldeaCliHumanValidateResult } from "./chunks/composition-BNE2Fn_6.js";
3
3
  import path from "node:path";
4
4
  import process from "node:process";
5
5
  import { fileURLToPath } from "node:url";
@@ -2594,11 +2594,11 @@ var createMoldeaCliContentExecutionResult = (pageResult, cliVersion, isJson, cur
2594
2594
  //#region src/cli-execution/command-executor.ts
2595
2595
  /** Loads isolated Core inspection only for commands that need it. */
2596
2596
  var executeLazyCoreInspection = async (input) => {
2597
- const { executeMoldeaCliCoreInspection } = await import("./chunks/core-composition-DeWcE7Bf.js");
2597
+ const { executeMoldeaCliCoreInspection } = await import("./chunks/core-composition-CJkwbKa4.js");
2598
2598
  return executeMoldeaCliCoreInspection(input);
2599
2599
  };
2600
2600
  var loadInstalledComposition = async (input) => {
2601
- const { resolveInstalledMoldeaCliComposition } = await import("./chunks/composition-PoYBx0Mw.js");
2601
+ const { resolveInstalledMoldeaCliComposition } = await import("./chunks/composition-eP3YRV8y.js");
2602
2602
  return resolveInstalledMoldeaCliComposition(input);
2603
2603
  };
2604
2604
  /** Creates one operational error result without exposing caught failure details. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moldea.ai/cli",
3
- "version": "13.0.2",
3
+ "version": "13.0.3",
4
4
  "description": "The canonical read-only local command-line composition for moldea repositories.",
5
5
  "homepage": "https://github.com/moldea-ai/packages/tree/main/projects/cli#readme",
6
6
  "bugs": {
@@ -29,7 +29,7 @@
29
29
  "node": ">=22.17.0"
30
30
  },
31
31
  "dependencies": {
32
- "@moldea.ai/core": "^9.0.0",
32
+ "@moldea.ai/core": "^9.1.1",
33
33
  "@moldea.ai/repository": "^4.0.0",
34
34
  "@moldea.ai/repository-fs": "^4.0.0",
35
35
  "jg-crypto": "0.3.0",