@moldea.ai/cli 11.1.0 → 12.0.0
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 +3 -3
- package/dist/chunks/{composition-bB23wZlW.js → composition-8VLm2c-X.js} +1 -1
- package/dist/chunks/{composition-P7DOCYEA.js → composition-DX66KnuP.js} +4 -4
- package/dist/chunks/{composition-P7DOCYEA.js.map → composition-DX66KnuP.js.map} +1 -1
- package/dist/chunks/{core-composition-BH3Wj5Lq.js → core-composition-Bbpu62TT.js} +2 -2
- package/dist/chunks/{core-composition-BH3Wj5Lq.js.map → core-composition-Bbpu62TT.js.map} +1 -1
- package/dist/moldea.js +76 -51
- package/dist/moldea.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { o as MoldeaCliCompositionException, t as resolveInstalledMoldeaCliComposition } from "./composition-
|
|
2
|
+
import { o as MoldeaCliCompositionException, t as resolveInstalledMoldeaCliComposition } from "./composition-DX66KnuP.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-
|
|
94
|
+
//# sourceMappingURL=core-composition-Bbpu62TT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-composition-
|
|
1
|
+
{"version":3,"file":"core-composition-Bbpu62TT.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,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as hasOnlyUnicodeScalarValues$1, C as formatMoldeaCliJsonError, D as createMoldeaCliOwnedError, E as formatMoldeaCliJsonValidateResult, F as encodeMoldeaCliCursor, I as MoldeaCliOutputPageException, L as MOLDEA_CLI_COMMANDS, M as createMoldeaCliOutputPage, N as calculateMoldeaCliJsonDigest, O as MOLDEA_CLI_GIT_WORKING_TREE_SOURCE, P as decodeMoldeaCliCursor, S as formatMoldeaCliJsonContentResult, T as formatMoldeaCliJsonScopeResult, _ as formatMoldeaCliHumanError, a as require_semver, b as formatMoldeaCliHumanValidateResult, c as executeGitStreamingProcess, d as createMoldeaCliDiagnosticRecord, f as createMoldeaCliInspectProjection, g as formatMoldeaCliHumanContentResult, h as formatMoldeaCliHumanCompositionResult, j as isRepositoryDirectoryInputValid, k as parseMoldeaCliArguments, l as executeGitProcess, m as formatMoldeaCliHelp, o as MoldeaCliCompositionException, p as createMoldeaCliValidateProjection, s as createGitVersionPreflight, u as MAX_GIT_PROCESS_DIAGNOSTIC_BYTES, v as formatMoldeaCliHumanInspectResult, w as formatMoldeaCliJsonInspectResult, x as formatMoldeaCliJsonCompositionResult, y as formatMoldeaCliHumanScopeResult } from "./chunks/composition-
|
|
2
|
+
import { A as hasOnlyUnicodeScalarValues$1, C as formatMoldeaCliJsonError, D as createMoldeaCliOwnedError, E as formatMoldeaCliJsonValidateResult, F as encodeMoldeaCliCursor, I as MoldeaCliOutputPageException, L as MOLDEA_CLI_COMMANDS, M as createMoldeaCliOutputPage, N as calculateMoldeaCliJsonDigest, O as MOLDEA_CLI_GIT_WORKING_TREE_SOURCE, P as decodeMoldeaCliCursor, S as formatMoldeaCliJsonContentResult, T as formatMoldeaCliJsonScopeResult, _ as formatMoldeaCliHumanError, a as require_semver, b as formatMoldeaCliHumanValidateResult, c as executeGitStreamingProcess, d as createMoldeaCliDiagnosticRecord, f as createMoldeaCliInspectProjection, g as formatMoldeaCliHumanContentResult, h as formatMoldeaCliHumanCompositionResult, j as isRepositoryDirectoryInputValid, k as parseMoldeaCliArguments, l as executeGitProcess, m as formatMoldeaCliHelp, o as MoldeaCliCompositionException, p as createMoldeaCliValidateProjection, s as createGitVersionPreflight, u as MAX_GIT_PROCESS_DIAGNOSTIC_BYTES, v as formatMoldeaCliHumanInspectResult, w as formatMoldeaCliJsonInspectResult, x as formatMoldeaCliJsonCompositionResult, y as formatMoldeaCliHumanScopeResult } from "./chunks/composition-DX66KnuP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
import { REPOSITORY_ROOT, RepositorySourceException, createRepositoryComparison, isRepositoryPath, parseRepositoryPath } from "@moldea.ai/repository";
|
|
6
|
+
import { REPOSITORY_LINK_TEXT_MAX_BYTES, REPOSITORY_ROOT, RepositorySourceException, createRepositoryComparison, isRepositoryPath, parseRepositoryPath } from "@moldea.ai/repository";
|
|
7
7
|
import { lstat, readFile, readdir, stat } from "node:fs/promises";
|
|
8
8
|
import { CoreConfigurationException, CoreOperationException, createCore } from "@moldea.ai/core";
|
|
9
9
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
10
|
-
import {
|
|
10
|
+
import { createFilesystemRepositoryReader } from "@moldea.ai/repository-fs";
|
|
11
11
|
//#region src/cli-execution/constants.ts
|
|
12
12
|
var MOLDEA_CLI_EXIT_CODES = {
|
|
13
13
|
Interrupted: 130,
|
|
@@ -767,6 +767,25 @@ var GitContentTransformationGuardRepositoryReader = class {
|
|
|
767
767
|
throw new GitContentTransformUnsupportedException(parsedPath);
|
|
768
768
|
}
|
|
769
769
|
/**
|
|
770
|
+
* Reads a link's stored text unchanged, because Git applies no content transformation to links.
|
|
771
|
+
* @param path The validated repository path of the symlink entry.
|
|
772
|
+
* @param options Optional cancellation controls.
|
|
773
|
+
* @returns A promise resolving to the text, or `null` past 4096 UTF-8 bytes or for invalid UTF-8.
|
|
774
|
+
* @throws
|
|
775
|
+
* - INVALID_REPOSITORY_PATH: The repository path is invalid.
|
|
776
|
+
* - ENTRY_NOT_FOUND: The requested repository entry was not found.
|
|
777
|
+
* - ENTRY_NOT_LINK: The requested repository entry is not a symlink.
|
|
778
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
779
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
780
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during the operation.
|
|
781
|
+
* - INVALID_SOURCE_DATA: The repository source returned invalid data.
|
|
782
|
+
* - RESOURCE_LIMIT_EXCEEDED: A repository reading resource limit was exceeded.
|
|
783
|
+
* - ABORTED: The repository operation was aborted.
|
|
784
|
+
*/
|
|
785
|
+
readLinkText(path, options) {
|
|
786
|
+
return this.#reader.readLinkText(path, options);
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
770
789
|
* Recursively lists entries without changing the underlying logical inventory.
|
|
771
790
|
* @param options Optional prefix and cancellation controls.
|
|
772
791
|
* @returns The underlying async iterable of detached repository entries.
|
|
@@ -816,6 +835,7 @@ var REPOSITORY_SOURCE_ERROR_MESSAGES = Object.freeze({
|
|
|
816
835
|
ENTRY_NOT_DIRECTORY: "The requested repository entry is not a directory.",
|
|
817
836
|
ENTRY_NOT_FILE: "The requested repository entry is not a file.",
|
|
818
837
|
ENTRY_NOT_FOUND: "The requested repository entry was not found.",
|
|
838
|
+
ENTRY_NOT_LINK: "The requested repository entry is not a symlink.",
|
|
819
839
|
INVALID_PAGE_REQUEST: "The repository page request is invalid.",
|
|
820
840
|
INVALID_SOURCE_DATA: "The repository source returned invalid data.",
|
|
821
841
|
PROVIDER_INCOMPLETE: "The repository provider could not expose a complete result.",
|
|
@@ -2118,6 +2138,10 @@ var areGitInventoriesEqual = (left, right) => left.length === right.length && le
|
|
|
2118
2138
|
});
|
|
2119
2139
|
//#endregion
|
|
2120
2140
|
//#region src/repository-symlink-overlay/reader.ts
|
|
2141
|
+
var decoder = new TextDecoder("utf-8", {
|
|
2142
|
+
fatal: true,
|
|
2143
|
+
ignoreBOM: true
|
|
2144
|
+
});
|
|
2121
2145
|
/** Throws the common cancellation contract for wrapper-owned operations. */
|
|
2122
2146
|
var throwIfAborted = (signal, operation, path) => {
|
|
2123
2147
|
if (!signal?.aborted) return;
|
|
@@ -2212,6 +2236,47 @@ var GitSymlinkOverlayRepositoryReader = class {
|
|
|
2212
2236
|
});
|
|
2213
2237
|
}
|
|
2214
2238
|
/**
|
|
2239
|
+
* Reads a link's stored text. A Git link checked out as a plain file holds exactly the text Git
|
|
2240
|
+
* stored, so its bounded bytes are that text; other paths read the underlying reader.
|
|
2241
|
+
* @param path The validated repository path of the symlink entry.
|
|
2242
|
+
* @param options Optional cancellation controls.
|
|
2243
|
+
* @returns A promise resolving to the text, or `null` past 4096 UTF-8 bytes or for invalid UTF-8.
|
|
2244
|
+
* @throws
|
|
2245
|
+
* - INVALID_REPOSITORY_PATH: The repository path is invalid.
|
|
2246
|
+
* - ENTRY_NOT_FOUND: The requested repository entry was not found.
|
|
2247
|
+
* - ENTRY_NOT_LINK: The requested repository entry is not a symlink.
|
|
2248
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
2249
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
2250
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during the operation.
|
|
2251
|
+
* - INVALID_SOURCE_DATA: The repository source returned invalid data.
|
|
2252
|
+
* - RESOURCE_LIMIT_EXCEEDED: A repository reading resource limit was exceeded.
|
|
2253
|
+
* - ABORTED: The repository operation was aborted.
|
|
2254
|
+
*/
|
|
2255
|
+
async readLinkText(path, options) {
|
|
2256
|
+
const parsedPath = parseRepositoryPath(path);
|
|
2257
|
+
if (!this.#overlayPaths.has(parsedPath)) return this.#reader.readLinkText(parsedPath, options);
|
|
2258
|
+
throwIfAborted(options?.signal, "read-link-text", parsedPath);
|
|
2259
|
+
const entry = await this.#reader.getEntry(parsedPath, options);
|
|
2260
|
+
validateOverlayEntry(entry, "read-link-text", parsedPath);
|
|
2261
|
+
throwIfAborted(options?.signal, "read-link-text", parsedPath);
|
|
2262
|
+
const byteLength = entry?.byteLength ?? null;
|
|
2263
|
+
if (byteLength === null) throw createInvalidOverlayException("read-link-text", parsedPath);
|
|
2264
|
+
if (byteLength > REPOSITORY_LINK_TEXT_MAX_BYTES) return null;
|
|
2265
|
+
if (byteLength === 0) return "";
|
|
2266
|
+
const page = await this.#reader.readFilePage(parsedPath, {
|
|
2267
|
+
maxBytes: byteLength,
|
|
2268
|
+
offset: 0,
|
|
2269
|
+
...options?.signal === void 0 ? {} : { signal: options.signal }
|
|
2270
|
+
});
|
|
2271
|
+
throwIfAborted(options?.signal, "read-link-text", parsedPath);
|
|
2272
|
+
if (!page.isComplete || page.totalBytes !== byteLength || page.bytes.byteLength !== byteLength) throw createInvalidOverlayException("read-link-text", parsedPath);
|
|
2273
|
+
try {
|
|
2274
|
+
return decoder.decode(page.bytes);
|
|
2275
|
+
} catch {
|
|
2276
|
+
return null;
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
/**
|
|
2215
2280
|
* Recursively lists descendants while replacing configured host files with logical symlinks.
|
|
2216
2281
|
* @param options Optional prefix and cancellation controls.
|
|
2217
2282
|
* @returns An async iterable of detached logical entries.
|
|
@@ -2274,34 +2339,6 @@ var createGitSymlinkOverlayRepositoryReader = (reader, symlinkPaths) => {
|
|
|
2274
2339
|
return Object.freeze(new GitSymlinkOverlayRepositoryReader(reader, overlayPaths));
|
|
2275
2340
|
};
|
|
2276
2341
|
//#endregion
|
|
2277
|
-
//#region src/repository-symlink-overlay/link-resolver.ts
|
|
2278
|
-
/**
|
|
2279
|
-
* Wraps a link resolver so Git symlinks materialized as host files resolve as unsafe. Their host
|
|
2280
|
-
* bytes are link text Git wrote, not a link the filesystem can follow, so they are never read.
|
|
2281
|
-
* @param resolver The resolver bound to the underlying filesystem reader.
|
|
2282
|
-
* @param symlinkPaths The logical paths whose host files represent Git symlinks.
|
|
2283
|
-
* @returns A frozen resolver that shares the underlying resolver's snapshot.
|
|
2284
|
-
* @throws
|
|
2285
|
-
* - INVALID_REPOSITORY_PATH: The repository path is invalid.
|
|
2286
|
-
*/
|
|
2287
|
-
var createGitSymlinkOverlayLinkResolver = (resolver, symlinkPaths) => {
|
|
2288
|
-
const overlayPaths = new Set(symlinkPaths.map((symlinkPath) => parseRepositoryPath(symlinkPath)));
|
|
2289
|
-
return Object.freeze({
|
|
2290
|
-
snapshot: resolver.snapshot,
|
|
2291
|
-
resolveLink: async (path, options) => overlayPaths.has(parseRepositoryPath(path)) ? { state: "unsafe" } : resolver.resolveLink(path, options),
|
|
2292
|
-
readLinkTargetPage: async (path, options) => {
|
|
2293
|
-
const parsedPath = parseRepositoryPath(path);
|
|
2294
|
-
if (overlayPaths.has(parsedPath)) throw new RepositorySourceException({
|
|
2295
|
-
code: "ENTRY_NOT_FILE",
|
|
2296
|
-
operation: "read-file-page",
|
|
2297
|
-
path: parsedPath,
|
|
2298
|
-
retryable: false
|
|
2299
|
-
});
|
|
2300
|
-
return resolver.readLinkTargetPage(parsedPath, options);
|
|
2301
|
-
}
|
|
2302
|
-
});
|
|
2303
|
-
};
|
|
2304
|
-
//#endregion
|
|
2305
2342
|
//#region src/repository-reader/factory.ts
|
|
2306
2343
|
/** Composes the filesystem, Git symlink overlay, and content-transformation guard layers. */
|
|
2307
2344
|
var composeWorkingTreeReader = async (input, filesystemReaderFactory, symlinkOverlayFactory, contentTransformationGuardFactory) => {
|
|
@@ -2314,7 +2351,7 @@ var composeWorkingTreeReader = async (input, filesystemReaderFactory, symlinkOve
|
|
|
2314
2351
|
if (entry.contentTransformation.isGuarded) paths.push(entry.path);
|
|
2315
2352
|
return paths;
|
|
2316
2353
|
}, []));
|
|
2317
|
-
|
|
2354
|
+
return contentTransformationGuardFactory(symlinkOverlayFactory(await filesystemReaderFactory({
|
|
2318
2355
|
limits: Object.freeze({
|
|
2319
2356
|
maxCachedBytes: input.resourceLimits.maxTotalBytes,
|
|
2320
2357
|
maxDirectoryEntries: input.resourceLimits.maxEntries,
|
|
@@ -2328,12 +2365,7 @@ var composeWorkingTreeReader = async (input, filesystemReaderFactory, symlinkOve
|
|
|
2328
2365
|
paths: selectedPaths
|
|
2329
2366
|
}),
|
|
2330
2367
|
...input.signal === void 0 ? {} : { signal: input.signal }
|
|
2331
|
-
});
|
|
2332
|
-
return {
|
|
2333
|
-
filesystemReader,
|
|
2334
|
-
reader: contentTransformationGuardFactory(symlinkOverlayFactory(filesystemReader, symlinkOverlayPaths), guardedPaths),
|
|
2335
|
-
symlinkOverlayPaths
|
|
2336
|
-
};
|
|
2368
|
+
}), symlinkOverlayPaths), guardedPaths);
|
|
2337
2369
|
};
|
|
2338
2370
|
/**
|
|
2339
2371
|
* Creates the private working-tree reader factory around injectable composition boundaries.
|
|
@@ -2342,24 +2374,17 @@ var composeWorkingTreeReader = async (input, filesystemReaderFactory, symlinkOve
|
|
|
2342
2374
|
* @param contentTransformationGuardFactory The guarded logical regular-file reader factory.
|
|
2343
2375
|
* @returns A factory that composes one coherent selected working-tree reader.
|
|
2344
2376
|
*/
|
|
2345
|
-
var createWorkingTreeRepositoryReaderFactory = (filesystemReaderFactory = createFilesystemRepositoryReader, symlinkOverlayFactory = createGitSymlinkOverlayRepositoryReader, contentTransformationGuardFactory = createGitContentTransformationGuardRepositoryReader) =>
|
|
2377
|
+
var createWorkingTreeRepositoryReaderFactory = (filesystemReaderFactory = createFilesystemRepositoryReader, symlinkOverlayFactory = createGitSymlinkOverlayRepositoryReader, contentTransformationGuardFactory = createGitContentTransformationGuardRepositoryReader) => (input) => composeWorkingTreeReader(input, filesystemReaderFactory, symlinkOverlayFactory, contentTransformationGuardFactory);
|
|
2346
2378
|
var createWorkingTreeRepositoryReader = createWorkingTreeRepositoryReaderFactory();
|
|
2347
2379
|
/**
|
|
2348
2380
|
* Creates the instruction-source factory: an exact-path reader for the probed instruction
|
|
2349
|
-
* entries, with the same layers as the repository reader
|
|
2350
|
-
* to its filesystem reader so that Git-materialized links resolve as unsafe.
|
|
2381
|
+
* entries, with the same layers as the repository reader.
|
|
2351
2382
|
* @param filesystemReaderFactory The exact-path filesystem snapshot factory.
|
|
2352
2383
|
* @param symlinkOverlayFactory The logical Git symlink overlay factory.
|
|
2353
2384
|
* @param contentTransformationGuardFactory The guarded logical regular-file reader factory.
|
|
2354
|
-
* @returns A factory that composes one coherent instruction
|
|
2385
|
+
* @returns A factory that composes one coherent instruction reader.
|
|
2355
2386
|
*/
|
|
2356
|
-
var createWorkingTreeInstructionSourceFactory = (filesystemReaderFactory = createFilesystemRepositoryReader, symlinkOverlayFactory = createGitSymlinkOverlayRepositoryReader, contentTransformationGuardFactory = createGitContentTransformationGuardRepositoryReader) =>
|
|
2357
|
-
const composed = await composeWorkingTreeReader(input, filesystemReaderFactory, symlinkOverlayFactory, contentTransformationGuardFactory);
|
|
2358
|
-
return Object.freeze({
|
|
2359
|
-
linkResolver: createGitSymlinkOverlayLinkResolver(createFilesystemRepositoryLinkResolver(composed.filesystemReader), composed.symlinkOverlayPaths),
|
|
2360
|
-
reader: composed.reader
|
|
2361
|
-
});
|
|
2362
|
-
};
|
|
2387
|
+
var createWorkingTreeInstructionSourceFactory = (filesystemReaderFactory = createFilesystemRepositoryReader, symlinkOverlayFactory = createGitSymlinkOverlayRepositoryReader, contentTransformationGuardFactory = createGitContentTransformationGuardRepositoryReader) => (input) => composeWorkingTreeReader(input, filesystemReaderFactory, symlinkOverlayFactory, contentTransformationGuardFactory);
|
|
2363
2388
|
var createWorkingTreeInstructionSource = createWorkingTreeInstructionSourceFactory();
|
|
2364
2389
|
//#endregion
|
|
2365
2390
|
//#region src/working-tree-snapshot/executor.ts
|
|
@@ -2650,11 +2675,11 @@ var createMoldeaCliContentExecutionResult = (pageResult, cliVersion, isJson, cur
|
|
|
2650
2675
|
//#region src/cli-execution/command-executor.ts
|
|
2651
2676
|
/** Loads isolated Core inspection only for commands that need it. */
|
|
2652
2677
|
var executeLazyCoreInspection = async (input) => {
|
|
2653
|
-
const { executeMoldeaCliCoreInspection } = await import("./chunks/core-composition-
|
|
2678
|
+
const { executeMoldeaCliCoreInspection } = await import("./chunks/core-composition-Bbpu62TT.js");
|
|
2654
2679
|
return executeMoldeaCliCoreInspection(input);
|
|
2655
2680
|
};
|
|
2656
2681
|
var loadInstalledComposition = async (input) => {
|
|
2657
|
-
const { resolveInstalledMoldeaCliComposition } = await import("./chunks/composition-
|
|
2682
|
+
const { resolveInstalledMoldeaCliComposition } = await import("./chunks/composition-8VLm2c-X.js");
|
|
2658
2683
|
return resolveInstalledMoldeaCliComposition(input);
|
|
2659
2684
|
};
|
|
2660
2685
|
/** Creates one operational error result without exposing caught failure details. */
|