@orkestrel/scaffold 0.0.30 → 0.0.32

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.
@@ -1,5 +1,5 @@
1
1
  import { andOf, arrayOf, attempt, boundsOf, holds, isArray, isBoolean, isError, isFunction, isInteger, isRecord, isString, parseJSON, parseJSONAs, parseStringField, recordOf, stringOf } from "@orkestrel/contract";
2
- import { CATALOG_AGENT_PATH, CONTROL_CHARACTER_PATTERN, EXECUTABLE_PATHS, HOST_PATHS, MAX_ARTIFACT_BYTES, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, ScaffoldError, bytesToHex, catalogToLayers, cloneValue, computeBytes, contentToHex, inferGroup, isAudit, isCatalogEntry, isCollection, isDependency, isDependencyName, isMirror, isPath, isPlan, isSnapshot, matchesDriftReachability, nameToGuide, planToFindings } from "../core/index.js";
2
+ import { CATALOG_AGENT_PATH, CONTROL_CHARACTER_PATTERN, EXECUTABLE_PATHS, HOST_PATHS, MAX_ARTIFACT_BYTES, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, ScaffoldError, WORKSPACE_OWNED_PATHS, bytesToHex, catalogToLayers, cloneValue, computeBytes, contentToHex, inferGroup, isAudit, isCatalogEntry, isCollection, isDependency, isDependencyName, isMirror, isPath, isPlan, isSnapshot, matchesDriftReachability, nameToGuide, planToFindings } from "../core/index.js";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { chmodSync, closeSync, constants, copyFileSync, fstatSync, linkSync, lstatSync, mkdirSync, openSync, opendirSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, writeFileSync } from "node:fs";
5
5
  import { basename, dirname, join, parse, relative, resolve, sep } from "node:path";
@@ -2602,6 +2602,10 @@ var Materializer = class Materializer {
2602
2602
  let budget = remaining;
2603
2603
  for (const entry of matched) {
2604
2604
  const path = this.#remap(artifact, entry.destination);
2605
+ if (WORKSPACE_OWNED_PATHS.includes(path)) {
2606
+ expanded.push(this.#presence(artifact, path, entry.destination));
2607
+ continue;
2608
+ }
2605
2609
  if (this.#deferred(path)) {
2606
2610
  expanded.push(this.#presence(artifact, path, entry.destination));
2607
2611
  continue;
@@ -2618,7 +2622,11 @@ var Materializer = class Materializer {
2618
2622
  host: this.#host,
2619
2623
  source
2620
2624
  });
2621
- if (isPhysicalFile(full)) return [this.#deferred(artifact.path) ? this.#presence(artifact, artifact.path, source) : this.#hydrated(artifact, artifact.path, source, this.#read(source, remaining))];
2625
+ if (isPhysicalFile(full)) {
2626
+ if (WORKSPACE_OWNED_PATHS.includes(artifact.path)) return [this.#presence(artifact, artifact.path, source)];
2627
+ if (this.#deferred(artifact.path)) return [this.#presence(artifact, artifact.path, source)];
2628
+ return [this.#hydrated(artifact, artifact.path, source, this.#read(source, remaining))];
2629
+ }
2622
2630
  if (!isPhysicalDirectory(full)) throw this.#error("TARGET", `The host source at ${source} is not a readable file.`, {
2623
2631
  host: this.#host,
2624
2632
  source
@@ -2628,6 +2636,10 @@ var Materializer = class Materializer {
2628
2636
  for (const name of listFiles(full)) {
2629
2637
  const path = `${artifact.path}/${name}`;
2630
2638
  const destination = `${source}/${name}`;
2639
+ if (WORKSPACE_OWNED_PATHS.includes(path)) {
2640
+ expanded.push(this.#presence(artifact, path, destination));
2641
+ continue;
2642
+ }
2631
2643
  if (this.#deferred(path)) {
2632
2644
  expanded.push(this.#presence(artifact, path, destination));
2633
2645
  continue;