@orkestrel/scaffold 0.0.139 → 0.0.140

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.
@@ -686,7 +686,7 @@ function resolveRealPath(path) {
686
686
  * ```
687
687
  */
688
688
  function climbRealPath(current, pending, depth) {
689
- if (!Number.isSafeInteger(depth) || depth < 0 || depth > 64) return void 0;
689
+ if (!(0, _orkestrel_contract.isSafeInteger)(depth) || depth < 0 || depth > 64) return void 0;
690
690
  const real = (0, _orkestrel_contract.attempt)(() => (0, node_fs.realpathSync)(current));
691
691
  if (real.success) return pending.length === 0 ? real.value : (0, node_path.join)(real.value, ...pending);
692
692
  if (!matchesMissingPath(real.error)) return void 0;
@@ -1122,7 +1122,7 @@ function pruneEmptiedDirectories(target, removed) {
1122
1122
  * ```
1123
1123
  */
1124
1124
  function readFileHex(root, path, limit = _src_core.MAX_ARTIFACT_BYTES) {
1125
- if (!(0, _orkestrel_contract.isNumber)(limit) || !Number.isSafeInteger(limit) || limit < 0 || limit > _src_core.MAX_ARTIFACT_BYTES) throw new _src_core.ScaffoldError("INVALID", `Byte limit is outside the artifact ceiling at ${path}`, {
1125
+ if (!(0, _orkestrel_contract.isSafeInteger)(limit) || limit < 0 || limit > _src_core.MAX_ARTIFACT_BYTES) throw new _src_core.ScaffoldError("INVALID", `Byte limit is outside the artifact ceiling at ${path}`, {
1126
1126
  root,
1127
1127
  path,
1128
1128
  limit
@@ -3319,7 +3319,7 @@ var Materializer = class {
3319
3319
  * @param plan - The compiled plan to compare.
3320
3320
  * @param target - The directory to inspect.
3321
3321
  * @returns Findings for hydrated planned paths and selected foreign candidates,
3322
- * plus non-blocking questions for present foreign mirrors differing from hosted guides.
3322
+ * and no questions.
3323
3323
  * @throws {@link ScaffoldError} coded `INVALID` when an argument is not the
3324
3324
  * exact shape, `TARGET` when the host or target cannot be read within its
3325
3325
  * bounds, and `DESTROYED` after teardown.
@@ -3679,27 +3679,9 @@ var Materializer = class {
3679
3679
  ...listCanonPaths(target, plan.groups),
3680
3680
  ...listWrapperPaths(target, plan.groups)
3681
3681
  ]);
3682
- const questions = [];
3683
- if (plan.groups.includes("guides")) {
3684
- const directory = resolveContainedPath(target, "guides");
3685
- const spent = [];
3686
- for (const file of directory === void 0 ? [] : listFiles(directory)) {
3687
- const path = `guides/${file}`;
3688
- if (file.includes("/") || file === "README.md" || !file.endsWith(".md") || path === (0, _src_core.nameToGuide)(plan.blueprint.name)) continue;
3689
- const hosted = this.#reference(path, _src_core.MAX_TOTAL_ARTIFACT_BYTES - (0, _src_core.computeTotal)(spent));
3690
- if (hosted === void 0) continue;
3691
- spent.push(hosted.length / 2);
3692
- const present = readFileHex(target, path);
3693
- if (present !== void 0 && present !== hosted) questions.push({
3694
- field: "guides",
3695
- message: `The mirror at ${path} differs from the hosted guide. Run catalog to refresh it.`,
3696
- blocking: false
3697
- });
3698
- }
3699
- }
3700
3682
  return {
3701
3683
  findings: (0, _src_core.planToArtifactFindings)(hydrated, readSnapshot(target, [...paths])),
3702
- questions
3684
+ questions: []
3703
3685
  };
3704
3686
  }
3705
3687
  #reference(path, budget) {
@@ -4168,7 +4150,7 @@ var ReadAllowance = class {
4168
4150
  * non-negative safe integer.
4169
4151
  */
4170
4152
  constructor(budget) {
4171
- if (!(0, _orkestrel_contract.isNonNegativeInteger)(budget) || !Number.isSafeInteger(budget)) throw new _src_core.ScaffoldError("INVALID", "The read budget is not a non-negative safe integer.", { field: "budget" });
4153
+ if (!(0, _orkestrel_contract.isNonNegativeInteger)(budget) || !(0, _orkestrel_contract.isSafeInteger)(budget)) throw new _src_core.ScaffoldError("INVALID", "The read budget is not a non-negative safe integer.", { field: "budget" });
4172
4154
  this.#remaining = budget;
4173
4155
  }
4174
4156
  /** The bytes the call has left; negative after a read overshoots the budget. */
@@ -4193,7 +4175,7 @@ var ReadAllowance = class {
4193
4175
  * ```
4194
4176
  */
4195
4177
  spend(bytes) {
4196
- if (!(0, _orkestrel_contract.isNonNegativeInteger)(bytes) || !Number.isSafeInteger(bytes)) throw new _src_core.ScaffoldError("INVALID", "The spent bytes are not a non-negative safe integer.", { field: "bytes" });
4178
+ if (!(0, _orkestrel_contract.isNonNegativeInteger)(bytes) || !(0, _orkestrel_contract.isSafeInteger)(bytes)) throw new _src_core.ScaffoldError("INVALID", "The spent bytes are not a non-negative safe integer.", { field: "bytes" });
4197
4179
  this.#remaining -= bytes;
4198
4180
  }
4199
4181
  };