@smoothbricks/nx-plugin 0.6.0 → 0.6.1

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.
Files changed (51) hide show
  1. package/README.md +13 -2
  2. package/dist/.build-inputs.json +13 -10
  3. package/dist/ensure-built-receipt.d.ts +9 -0
  4. package/dist/ensure-built-receipt.d.ts.map +1 -1
  5. package/dist/ensure-built-receipt.js +42 -1
  6. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +28 -0
  7. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -0
  8. package/dist/executors/bounded-exec/cpu-pool-thread.js +20 -0
  9. package/dist/executors/bounded-exec/cpu-pool.d.ts +4 -4
  10. package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
  11. package/dist/executors/bounded-exec/cpu-pool.js +7 -6
  12. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  13. package/dist/executors/bounded-exec/executor.js +20 -2
  14. package/dist/executors/bounded-exec/gateway-lease.d.ts +3 -2
  15. package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
  16. package/dist/executors/bounded-exec/gateway-lease.js +23 -3
  17. package/dist/executors/bounded-exec/lease-wait.d.ts +23 -2
  18. package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -1
  19. package/dist/executors/bounded-exec/lease-wait.js +15 -11
  20. package/dist/executors/bounded-exec/mbx-pool.d.ts +31 -0
  21. package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -0
  22. package/dist/executors/bounded-exec/mbx-pool.js +24 -0
  23. package/dist/executors/bounded-exec/run-cpu-pool.d.ts +9 -3
  24. package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
  25. package/dist/executors/bounded-exec/run-cpu-pool.js +109 -12
  26. package/dist/executors/bounded-exec/verdict.d.ts +8 -0
  27. package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
  28. package/dist/executors/bounded-exec/verdict.js +1 -1
  29. package/dist/executors/typescript-emit/emit-overrides.d.ts +14 -0
  30. package/dist/executors/typescript-emit/emit-overrides.d.ts.map +1 -0
  31. package/dist/executors/typescript-emit/emit-overrides.js +24 -0
  32. package/dist/executors/typescript-emit/executor.d.ts.map +1 -1
  33. package/dist/executors/typescript-emit/executor.js +1 -19
  34. package/dist/managed-files/publish-workflow.js +14 -11
  35. package/dist/producer-receipts.d.ts.map +1 -1
  36. package/dist/producer-receipts.js +441 -1
  37. package/package.json +19 -2
  38. package/src/ensure-built-receipt.ts +41 -0
  39. package/src/executors/bounded-exec/cpu-pool-thread.ts +43 -0
  40. package/src/executors/bounded-exec/cpu-pool.ts +7 -6
  41. package/src/executors/bounded-exec/executor.ts +20 -2
  42. package/src/executors/bounded-exec/gateway-lease.ts +17 -7
  43. package/src/executors/bounded-exec/lease-wait.ts +39 -12
  44. package/src/executors/bounded-exec/mbx-pool.ts +48 -0
  45. package/src/executors/bounded-exec/run-cpu-pool.ts +117 -15
  46. package/src/executors/bounded-exec/verdict.ts +8 -1
  47. package/src/executors/typescript-emit/emit-overrides.ts +24 -0
  48. package/src/executors/typescript-emit/executor.ts +1 -20
  49. package/src/managed-files/publish-workflow.ts +20 -15
  50. package/src/producer-receipts.ts +28 -0
  51. package/test-timings.json +119 -118
@@ -4,7 +4,7 @@ import { createRequire } from 'node:module';
4
4
  import { delimiter, dirname, join, resolve } from 'node:path';
5
5
  import typia from 'typia';
6
6
  import { createWorkspaceNxRequire, parseTargetSelector, providerInputProof, selectorTaskId, } from './ensure-built.js';
7
- import { captureProducerSource, captureProducerSources, producerOutputPaths, providerReceipt, receiptNode, } from './ensure-built-receipt.js';
7
+ import { captureProducerSource, captureProducerSources, producerOutputPaths, providerReceipt, receiptNode, removeOrphanedOutputs, } from './ensure-built-receipt.js';
8
8
  import { censusFileHashes, censusStart, directoryMembers, graphInstallationCensus, movedNodes, readInstallationCensus, workspaceSnapshot, writeWitness, } from './ensure-built-witness.js';
9
9
  import { graphInputContractIdentity } from './graph-input-contract.js';
10
10
  /**
@@ -324,6 +324,17 @@ export async function preTasksExecution(options, context) {
324
324
  runs.set(context.id, { ok: false, detail: 'No default producer roots scheduled', rootIds });
325
325
  return;
326
326
  }
327
+ // Before anything runs: what the producer's previous receipt declared and this graph no longer declares goes, so a
328
+ // layout change leaves no orphan in a published closure (removeOrphanedOutputs).
329
+ for (const [target, graph] of graphs) {
330
+ const previous = previousTaskGraph(context.workspaceRoot, target);
331
+ if (previous === null)
332
+ continue;
333
+ const removed = removeOrphanedOutputs(context.workspaceRoot, Object.values(previous.tasks), Object.values(graph.tasks), load('nx/src/native').expandOutputs, (task) => projectGraph.nodes[task.target.project]?.data.targets?.[task.target.target] !== undefined);
334
+ if (removed.length > 0) {
335
+ process.stderr.write(`producerReceipts: ${target}: removed outputs its previous receipt declared and no target declares now: ${removed.join(', ')}\n`);
336
+ }
337
+ }
327
338
  const outputs = new Map([...graphs].map(([target, graph]) => [
328
339
  target,
329
340
  producerOutputPaths(context.workspaceRoot, Object.values(graph.tasks), load('nx/src/native').expandOutputs),
@@ -512,6 +523,435 @@ function latestRefusal(root, target) {
512
523
  throw error;
513
524
  }
514
525
  }
526
+ /** The task graph the producer's previous published receipt recorded, whatever its validity now, or `null` when none reads. */
527
+ function previousTaskGraph(root, target) {
528
+ try {
529
+ const record = (() => {
530
+ const _ip0 = (input, _vctx = {}) => 1 === input["version"];
531
+ const _ip1 = (input, _vctx = {}) => "string" === typeof input["target"];
532
+ const _ip2 = (input, _vctx = {}) => "string" === typeof input["input"];
533
+ const _ip3 = (input, _vctx = {}) => null !== input["projects"] && undefined !== input["projects"] && ("string" === typeof input["projects"] || Array.isArray(input["projects"]) && input["projects"].every(elem => "string" === typeof elem));
534
+ const _ip4 = (input, _vctx = {}) => true === input["dependencies"];
535
+ const _ip5 = (input, _vctx = {}) => "string" === typeof input["fileset"];
536
+ const _ip6 = (input, _vctx = {}) => "string" === typeof input["command"];
537
+ const _ip7 = (input, _vctx = {}) => "object" === typeof input["nodes"] && null !== input["nodes"] && false === Array.isArray(input["nodes"]) && _io18(input["nodes"], _vctx);
538
+ const _ip8 = (input, _vctx = {}) => undefined === input["implicitDeps"] || "object" === typeof input["implicitDeps"] && null !== input["implicitDeps"] && false === Array.isArray(input["implicitDeps"]) && _io18(input["implicitDeps"], _vctx);
539
+ const _ip9 = (input, _vctx = {}) => undefined === input["runtime"] || "object" === typeof input["runtime"] && null !== input["runtime"] && false === Array.isArray(input["runtime"]) && _io18(input["runtime"], _vctx);
540
+ const _ip10 = (input, _vctx = {}) => "string" === typeof input["path"];
541
+ const _ip11 = (input, _vctx = {}) => "number" === typeof input["mode"];
542
+ const _ip12 = (input, _vctx = {}) => "string" === typeof input["sha256"];
543
+ const _ip13 = (input, _vctx = {}) => "string" === typeof input["name"];
544
+ const _ip14 = (input, _vctx = {}) => "string" === typeof input["from"];
545
+ const _ip15 = (input, _vctx = {}) => "string" === typeof input["id"];
546
+ const _ip16 = (input, _vctx = {}) => undefined === input["description"] || "string" === typeof input["description"];
547
+ const _ip17 = (input, _vctx = {}) => undefined === input["executor"] || "string" === typeof input["executor"];
548
+ const _ip18 = (input, _vctx = {}) => undefined === input["command"] || "string" === typeof input["command"];
549
+ const _ip19 = (input, _vctx = {}) => undefined === input["outputs"] || Array.isArray(input["outputs"]) && input["outputs"].every(elem => "string" === typeof elem);
550
+ const _ip20 = (input, _vctx = {}) => undefined === input["dependsOn"] || Array.isArray(input["dependsOn"]) && input["dependsOn"].every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _io33(elem, _vctx)));
551
+ const _ip21 = (input, _vctx = {}) => undefined === input["inputs"] || Array.isArray(input["inputs"]) && input["inputs"].every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _iu0(elem, _vctx)));
552
+ const _ip22 = (input, _vctx = {}) => true;
553
+ const _ip23 = (input, _vctx = {}) => undefined === input["configurations"] || "object" === typeof input["configurations"] && null !== input["configurations"] && false === Array.isArray(input["configurations"]) && _io34(input["configurations"], _vctx);
554
+ const _ip24 = (input, _vctx = {}) => undefined === input["defaultConfiguration"] || "string" === typeof input["defaultConfiguration"];
555
+ const _ip25 = (input, _vctx = {}) => undefined === input["cache"] || "boolean" === typeof input["cache"];
556
+ const _ip26 = (input, _vctx = {}) => undefined === input["metadata"] || "object" === typeof input["metadata"] && null !== input["metadata"] && false === Array.isArray(input["metadata"]) && _io35(input["metadata"], _vctx);
557
+ const _ip27 = (input, _vctx = {}) => undefined === input["parallelism"] || "boolean" === typeof input["parallelism"];
558
+ const _ip28 = (input, _vctx = {}) => undefined === input["continuous"] || "boolean" === typeof input["continuous"];
559
+ const _ip29 = (input, _vctx = {}) => undefined === input["syncGenerators"] || Array.isArray(input["syncGenerators"]) && input["syncGenerators"].every(elem => "string" === typeof elem);
560
+ const _ip30 = (input, _vctx = {}) => undefined === input["..."] || true === input["..."];
561
+ const _ip31 = (input, _vctx = {}) => null !== input["projects"] && (undefined === input["projects"] || "string" === typeof input["projects"] || Array.isArray(input["projects"]) && input["projects"].every(elem => "string" === typeof elem));
562
+ const _ip32 = (input, _vctx = {}) => undefined === input["technologies"] || Array.isArray(input["technologies"]) && input["technologies"].every(elem => "string" === typeof elem);
563
+ const _ip33 = (input, _vctx = {}) => null !== input["docker"] && (undefined === input["docker"] || true === input["docker"] || "object" === typeof input["docker"] && null !== input["docker"] && false === Array.isArray(input["docker"]) && _io45(input["docker"], _vctx));
564
+ const _ip34 = (input, _vctx = {}) => undefined === input["preVersionCommand"] || "string" === typeof input["preVersionCommand"];
565
+ const _ip36 = (input, _vctx = {}) => "string" === typeof input["packageName"];
566
+ const _ip37 = (input, _vctx = {}) => "string" === typeof input["type"];
567
+ const _ip38 = (input, _vctx = {}) => "string" === typeof input["version"];
568
+ const _ip39 = (input, _vctx = {}) => undefined === input["hash"] || "string" === typeof input["hash"];
569
+ const _ip40 = (input, _vctx = {}) => undefined === input["$schema"] || "string" === typeof input["$schema"];
570
+ const _ip41 = (input, _vctx = {}) => undefined === input["extends"] || "string" === typeof input["extends"];
571
+ const _ip42 = (input, _vctx = {}) => undefined === input["implicitDependencies"] || "object" === typeof input["implicitDependencies"] && null !== input["implicitDependencies"] && false === Array.isArray(input["implicitDependencies"]) && _io67(input["implicitDependencies"], _vctx);
572
+ const _ip43 = (input, _vctx = {}) => undefined === input["namedInputs"] || "object" === typeof input["namedInputs"] && null !== input["namedInputs"] && false === Array.isArray(input["namedInputs"]) && _io69(input["namedInputs"], _vctx);
573
+ const _ip44 = (input, _vctx = {}) => undefined === input["targetDefaults"] || "object" === typeof input["targetDefaults"] && null !== input["targetDefaults"] && false === Array.isArray(input["targetDefaults"]) && _io70(input["targetDefaults"], _vctx);
574
+ const _ip45 = (input, _vctx = {}) => undefined === input["affected"] || "object" === typeof input["affected"] && null !== input["affected"] && false === Array.isArray(input["affected"]) && _io76(input["affected"], _vctx);
575
+ const _ip46 = (input, _vctx = {}) => undefined === input["defaultBase"] || "string" === typeof input["defaultBase"];
576
+ const _ip47 = (input, _vctx = {}) => undefined === input["workspaceLayout"] || "object" === typeof input["workspaceLayout"] && null !== input["workspaceLayout"] && false === Array.isArray(input["workspaceLayout"]) && _io77(input["workspaceLayout"], _vctx);
577
+ const _ip48 = (input, _vctx = {}) => undefined === input["tasksRunnerOptions"] || "object" === typeof input["tasksRunnerOptions"] && null !== input["tasksRunnerOptions"] && false === Array.isArray(input["tasksRunnerOptions"]) && _io78(input["tasksRunnerOptions"], _vctx);
578
+ const _ip49 = (input, _vctx = {}) => undefined === input["generators"] || "object" === typeof input["generators"] && null !== input["generators"] && false === Array.isArray(input["generators"]) && _io80(input["generators"], _vctx);
579
+ const _ip50 = (input, _vctx = {}) => undefined === input["cli"] || "object" === typeof input["cli"] && null !== input["cli"] && false === Array.isArray(input["cli"]) && _io82(input["cli"], _vctx);
580
+ const _ip51 = (input, _vctx = {}) => undefined === input["plugins"] || Array.isArray(input["plugins"]) && input["plugins"].every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _io83(elem, _vctx)));
581
+ const _ip52 = (input, _vctx = {}) => undefined === input["pluginsConfig"] || "object" === typeof input["pluginsConfig"] && null !== input["pluginsConfig"] && false === Array.isArray(input["pluginsConfig"]) && _io84(input["pluginsConfig"], _vctx);
582
+ const _ip53 = (input, _vctx = {}) => undefined === input["defaultProject"] || "string" === typeof input["defaultProject"];
583
+ const _ip54 = (input, _vctx = {}) => undefined === input["installation"] || "object" === typeof input["installation"] && null !== input["installation"] && _io85(input["installation"], _vctx);
584
+ const _ip55 = (input, _vctx = {}) => undefined === input["release"] || "object" === typeof input["release"] && null !== input["release"] && false === Array.isArray(input["release"]) && _io86(input["release"], _vctx);
585
+ const _ip56 = (input, _vctx = {}) => undefined === input["nxCloudAccessToken"] || "string" === typeof input["nxCloudAccessToken"];
586
+ const _ip57 = (input, _vctx = {}) => undefined === input["nxCloudId"] || "string" === typeof input["nxCloudId"];
587
+ const _ip58 = (input, _vctx = {}) => undefined === input["nxCloudUrl"] || "string" === typeof input["nxCloudUrl"];
588
+ const _ip59 = (input, _vctx = {}) => undefined === input["nxCloudEncryptionKey"] || "string" === typeof input["nxCloudEncryptionKey"];
589
+ const _ip60 = (input, _vctx = {}) => undefined === input["parallel"] || "number" === typeof input["parallel"];
590
+ const _ip61 = (input, _vctx = {}) => undefined === input["cacheDirectory"] || "string" === typeof input["cacheDirectory"];
591
+ const _ip62 = (input, _vctx = {}) => undefined === input["useDaemonProcess"] || "boolean" === typeof input["useDaemonProcess"];
592
+ const _ip63 = (input, _vctx = {}) => undefined === input["useInferencePlugins"] || "boolean" === typeof input["useInferencePlugins"];
593
+ const _ip64 = (input, _vctx = {}) => undefined === input["neverConnectToCloud"] || "boolean" === typeof input["neverConnectToCloud"];
594
+ const _ip65 = (input, _vctx = {}) => undefined === input["analytics"] || "boolean" === typeof input["analytics"];
595
+ const _ip66 = (input, _vctx = {}) => undefined === input["sync"] || "object" === typeof input["sync"] && null !== input["sync"] && false === Array.isArray(input["sync"]) && _io108(input["sync"], _vctx);
596
+ const _ip67 = (input, _vctx = {}) => undefined === input["migrate"] || "object" === typeof input["migrate"] && null !== input["migrate"] && false === Array.isArray(input["migrate"]) && _io110(input["migrate"], _vctx);
597
+ const _ip68 = (input, _vctx = {}) => undefined === input["maxCacheSize"] || "string" === typeof input["maxCacheSize"];
598
+ const _ip69 = (input, _vctx = {}) => undefined === input["tui"] || "object" === typeof input["tui"] && null !== input["tui"] && false === Array.isArray(input["tui"]) && _io111(input["tui"], _vctx);
599
+ const _ip70 = (input, _vctx = {}) => undefined === input["projectsRelationship"] || "fixed" === input["projectsRelationship"] || "independent" === input["projectsRelationship"];
600
+ const _ip71 = (input, _vctx = {}) => undefined === input["git"] || "object" === typeof input["git"] && null !== input["git"] && false === Array.isArray(input["git"]) && _io101(input["git"], _vctx);
601
+ const _ip72 = (input, _vctx = {}) => null !== input["versionPlans"] && (undefined === input["versionPlans"] || "boolean" === typeof input["versionPlans"] || "object" === typeof input["versionPlans"] && null !== input["versionPlans"] && false === Array.isArray(input["versionPlans"]) && _io99(input["versionPlans"], _vctx));
602
+ const _ip73 = (input, _vctx = {}) => undefined === input["groupPreVersionCommand"] || "string" === typeof input["groupPreVersionCommand"];
603
+ const _ip74 = (input, _vctx = {}) => "string" === typeof input["hostname"];
604
+ const _ip75 = (input, _vctx = {}) => undefined === input["apiBaseUrl"] || "string" === typeof input["apiBaseUrl"];
605
+ const _ip76 = (input, _vctx = {}) => undefined === input["pattern"] || "string" === typeof input["pattern"];
606
+ const _ip77 = (input, _vctx = {}) => null !== input["checkAllBranchesWhen"] && (undefined === input["checkAllBranchesWhen"] || "boolean" === typeof input["checkAllBranchesWhen"] || Array.isArray(input["checkAllBranchesWhen"]) && input["checkAllBranchesWhen"].every(elem => "string" === typeof elem));
607
+ const _ip78 = (input, _vctx = {}) => undefined === input["requireSemver"] || "boolean" === typeof input["requireSemver"];
608
+ const _ip79 = (input, _vctx = {}) => undefined === input["preferDockerVersion"] || "both" === input["preferDockerVersion"] || "boolean" === typeof input["preferDockerVersion"];
609
+ const _ip80 = (input, _vctx = {}) => undefined === input["strictPreid"] || "boolean" === typeof input["strictPreid"];
610
+ const _ip35 = (input, _vctx = {}) => {
611
+ const array = input;
612
+ const tuplePredicators = [
613
+ [
614
+ top => top.length === 1 && "*" === top[0],
615
+ entire => entire.length === 1 && "*" === entire[0]
616
+ ]
617
+ ];
618
+ for (const pred of tuplePredicators)
619
+ if (pred[0](array))
620
+ return pred[1](array);
621
+ const top = input[0];
622
+ if (0 === input.length)
623
+ return true;
624
+ const arrayPredicators = [
625
+ [
626
+ top => "string" === typeof top,
627
+ entire => entire.every(elem => "string" === typeof elem)
628
+ ]
629
+ ];
630
+ const passed = arrayPredicators.filter(pred => pred[0](top));
631
+ if (1 === passed.length)
632
+ return passed[0][1](array);
633
+ else if (1 < passed.length)
634
+ for (const pred of passed)
635
+ if (array.every(value => true === pred[0](value)))
636
+ return pred[1](array);
637
+ return false;
638
+ };
639
+ const _io0 = (input, _vctx = {}) => _ip0(input, _vctx) && "published" === input.disposition && ("object" === typeof input.receipt && null !== input.receipt && _io1(input.receipt, _vctx)) && ("object" === typeof input.projectGraph && null !== input.projectGraph && _io26(input.projectGraph, _vctx)) && ("object" === typeof input.taskGraph && null !== input.taskGraph && _io61(input.taskGraph, _vctx)) && ("object" === typeof input.nxJson && null !== input.nxJson && false === Array.isArray(input.nxJson) && _io66(input.nxJson, _vctx));
640
+ const _io1 = (input, _vctx = {}) => "string" === typeof input.workspaceRoot && "string" === typeof input.head && "string" === typeof input.headTree && ("conservative-provider-source" === input.fileInputProvenance || "exact-file-inputs" === input.fileInputProvenance) && "nx-task-hash-only" === input.runtimeEnvironmentProvenance && ("object" === typeof input.producer && null !== input.producer && _io2(input.producer, _vctx)) && (Array.isArray(input.tasks) && input.tasks.every(elem => "object" === typeof elem && null !== elem && _io25(elem, _vctx)));
641
+ const _io10 = (input, _vctx = {}) => _ip5(input, _vctx) && _ip4(input, _vctx);
642
+ const _io100 = (input, _vctx = {}) => _ip71(input, _vctx) && (null !== input.workspaceChangelog && (undefined === input.workspaceChangelog || "boolean" === typeof input.workspaceChangelog || "object" === typeof input.workspaceChangelog && null !== input.workspaceChangelog && false === Array.isArray(input.workspaceChangelog) && _io92(input.workspaceChangelog, _vctx))) && (null !== input.projectChangelogs && (undefined === input.projectChangelogs || "boolean" === typeof input.projectChangelogs || "object" === typeof input.projectChangelogs && null !== input.projectChangelogs && false === Array.isArray(input.projectChangelogs) && _io92(input.projectChangelogs, _vctx))) && (undefined === input.automaticFromRef || "boolean" === typeof input.automaticFromRef);
643
+ const _io101 = (input, _vctx = {}) => (undefined === input.commit || "boolean" === typeof input.commit) && (undefined === input.commitMessage || "string" === typeof input.commitMessage) && (null !== input.commitArgs && (undefined === input.commitArgs || "string" === typeof input.commitArgs || Array.isArray(input.commitArgs) && input.commitArgs.every(elem => "string" === typeof elem))) && (undefined === input.stageChanges || "boolean" === typeof input.stageChanges) && (undefined === input.tag || "boolean" === typeof input.tag) && (undefined === input.tagMessage || "string" === typeof input.tagMessage) && (null !== input.tagArgs && (undefined === input.tagArgs || "string" === typeof input.tagArgs || Array.isArray(input.tagArgs) && input.tagArgs.every(elem => "string" === typeof elem))) && (undefined === input.push || "boolean" === typeof input.push) && (null !== input.pushArgs && (undefined === input.pushArgs || "string" === typeof input.pushArgs || Array.isArray(input.pushArgs) && input.pushArgs.every(elem => "string" === typeof elem)));
644
+ const _io102 = (input, _vctx = {}) => _io91(input, _vctx) && _ip71(input, _vctx);
645
+ const _io103 = (input, _vctx = {}) => _ip76(input, _vctx) && _ip77(input, _vctx) && _ip78(input, _vctx) && _ip79(input, _vctx) && _ip80(input, _vctx);
646
+ const _io104 = (input, _vctx = {}) => (undefined === input.useCommitScope || "boolean" === typeof input.useCommitScope) && (undefined === input.types || "object" === typeof input.types && null !== input.types && false === Array.isArray(input.types) && _io105(input.types, _vctx));
647
+ const _io105 = (input, _vctx = {}) => Object.keys(input).every(key => {
648
+ const value = input[key];
649
+ if (undefined === value)
650
+ return true;
651
+ return null !== value && undefined !== value && ("boolean" === typeof value || "object" === typeof value && null !== value && false === Array.isArray(value) && _io106(value, _vctx));
652
+ });
653
+ const _io106 = (input, _vctx = {}) => (undefined === input.semverBump || "major" === input.semverBump || "minor" === input.semverBump || "none" === input.semverBump || "patch" === input.semverBump) && (null !== input.changelog && (undefined === input.changelog || "boolean" === typeof input.changelog || "object" === typeof input.changelog && null !== input.changelog && false === Array.isArray(input.changelog) && _io107(input.changelog, _vctx)));
654
+ const _io107 = (input, _vctx = {}) => (undefined === input.title || "string" === typeof input.title) && (undefined === input.hidden || "boolean" === typeof input.hidden);
655
+ const _io108 = (input, _vctx = {}) => (undefined === input.globalGenerators || Array.isArray(input.globalGenerators) && input.globalGenerators.every(elem => "string" === typeof elem)) && (undefined === input.generatorOptions || "object" === typeof input.generatorOptions && null !== input.generatorOptions && false === Array.isArray(input.generatorOptions) && _io109(input.generatorOptions, _vctx)) && (undefined === input.applyChanges || "boolean" === typeof input.applyChanges) && (undefined === input.disabledTaskSyncGenerators || Array.isArray(input.disabledTaskSyncGenerators) && input.disabledTaskSyncGenerators.every(elem => "string" === typeof elem));
656
+ const _io109 = (input, _vctx = {}) => Object.keys(input).every(key => {
657
+ const value = input[key];
658
+ if (undefined === value)
659
+ return true;
660
+ return "object" === typeof value && null !== value && false === Array.isArray(value) && _io38(value, _vctx);
661
+ });
662
+ const _io11 = (input, _vctx = {}) => "string" === typeof input.runtime;
663
+ const _io110 = (input, _vctx = {}) => (undefined === input.createCommits || "boolean" === typeof input.createCommits) && (undefined === input.commitPrefix || "string" === typeof input.commitPrefix) && (undefined === input.include || "all" === input.include || "optional" === input.include || "required" === input.include) && (undefined === input.multiMajorMode || "direct" === input.multiMajorMode || "gradual" === input.multiMajorMode) && (undefined === input.useRegistryResolution || "boolean" === typeof input.useRegistryResolution) && (undefined === input.agentic || "claude-code" === input.agentic || "codex" === input.agentic || "opencode" === input.agentic || "boolean" === typeof input.agentic) && (undefined === input.validate || "boolean" === typeof input.validate);
664
+ const _io111 = (input, _vctx = {}) => (undefined === input.enabled || "boolean" === typeof input.enabled) && (undefined === input.autoExit || "number" === typeof input.autoExit || "boolean" === typeof input.autoExit) && (undefined === input.suppressHints || "boolean" === typeof input.suppressHints);
665
+ const _io12 = (input, _vctx = {}) => Array.isArray(input.externalDependencies) && input.externalDependencies.every(elem => "string" === typeof elem);
666
+ const _io13 = (input, _vctx = {}) => "string" === typeof input.dependentTasksOutputFiles && (undefined === input.transitive || "boolean" === typeof input.transitive);
667
+ const _io14 = (input, _vctx = {}) => "string" === typeof input.env;
668
+ const _io15 = (input, _vctx = {}) => "absolute" === input.workingDirectory || "relative" === input.workingDirectory;
669
+ const _io16 = (input, _vctx = {}) => Array.isArray(input.files) && input.files.every(elem => "string" === typeof elem) && (Array.isArray(input.runtime) && input.runtime.every(elem => "string" === typeof elem)) && (Array.isArray(input.environment) && input.environment.every(elem => "string" === typeof elem)) && (Array.isArray(input.depOutputs) && input.depOutputs.every(elem => "string" === typeof elem)) && (Array.isArray(input.external) && input.external.every(elem => "string" === typeof elem));
670
+ const _io17 = (input, _vctx = {}) => _ip6(input, _vctx) && _ip7(input, _vctx) && _ip8(input, _vctx) && _ip9(input, _vctx);
671
+ const _io18 = (input, _vctx = {}) => Object.keys(input).every(key => {
672
+ const value = input[key];
673
+ if (undefined === value)
674
+ return true;
675
+ return "string" === typeof value;
676
+ });
677
+ const _io19 = (input, _vctx = {}) => _ip10(input, _vctx) && _ip11(input, _vctx) && "string" === typeof input.gitBlob && _ip12(input, _vctx);
678
+ const _io2 = (input, _vctx = {}) => _ip0(input, _vctx) && _ip1(input, _vctx) && (Array.isArray(input.argv) && input.argv.every(elem => "string" === typeof elem)) && true === input.trackedTreeClean && "string" === typeof input.environmentIdentity && (Array.isArray(input.inputs) && input.inputs.every(elem => "object" === typeof elem && null !== elem && _io3(elem, _vctx))) && (Array.isArray(input.tools) && input.tools.every(elem => "object" === typeof elem && null !== elem && _io20(elem, _vctx))) && "string" === typeof input.outputSha256 && "number" === typeof input.wallTimeMs;
679
+ const _io20 = (input, _vctx = {}) => ("executable" === input.kind || "module" === input.kind) && _ip13(input, _vctx) && _ip14(input, _vctx) && _ip10(input, _vctx) && "string" === typeof input.physicalPath && (Array.isArray(input.missing) && input.missing.every(elem => "string" === typeof elem)) && (Array.isArray(input.resolutions) && input.resolutions.every(elem => "object" === typeof elem && null !== elem && _io21(elem, _vctx))) && (Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu1(elem, _vctx))) && _ip12(input, _vctx);
680
+ const _io21 = (input, _vctx = {}) => _ip13(input, _vctx) && _ip14(input, _vctx) && (null === input.target || "string" === typeof input.target);
681
+ const _io22 = (input, _vctx = {}) => _ip10(input, _vctx) && "file" === input.type && _ip11(input, _vctx) && _ip12(input, _vctx);
682
+ const _io23 = (input, _vctx = {}) => _ip10(input, _vctx) && "symlink" === input.type && _ip11(input, _vctx) && "string" === typeof input.linkText;
683
+ const _io24 = (input, _vctx = {}) => _ip10(input, _vctx) && "directory" === input.type && _ip11(input, _vctx) && (Array.isArray(input.entries) && input.entries.every(elem => "string" === typeof elem)) && _ip12(input, _vctx);
684
+ const _io25 = (input, _vctx = {}) => _ip15(input, _vctx) && "string" === typeof input.hash && (Array.isArray(input.outputs) && input.outputs.every(elem => "object" === typeof elem && null !== elem && _iu1(elem, _vctx)));
685
+ const _io26 = (input, _vctx = {}) => "object" === typeof input.nodes && null !== input.nodes && false === Array.isArray(input.nodes) && _io27(input.nodes, _vctx) && (undefined === input.externalNodes || "object" === typeof input.externalNodes && null !== input.externalNodes && false === Array.isArray(input.externalNodes) && _io56(input.externalNodes, _vctx)) && ("object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) && _io59(input.dependencies, _vctx)) && (undefined === input.version || "string" === typeof input.version);
686
+ const _io27 = (input, _vctx = {}) => Object.keys(input).every(key => {
687
+ const value = input[key];
688
+ if (undefined === value)
689
+ return true;
690
+ return "object" === typeof value && null !== value && _io28(value, _vctx);
691
+ });
692
+ const _io28 = (input, _vctx = {}) => ("app" === input.type || "e2e" === input.type || "lib" === input.type) && _ip13(input, _vctx) && ("object" === typeof input.data && null !== input.data && _io29(input.data, _vctx));
693
+ const _io29 = (input, _vctx = {}) => _io30(input, _vctx) && _ip16(input, _vctx);
694
+ const _io3 = (input, _vctx = {}) => "string" === typeof input.taskId && ("object" === typeof input.overrides && null !== input.overrides && false === Array.isArray(input.overrides) && _io4(input.overrides, _vctx)) && (Array.isArray(input.declared) && input.declared.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _iu0(elem, _vctx)))) && ("object" === typeof input.expanded && null !== input.expanded && _io16(input.expanded, _vctx)) && ("object" === typeof input.hashDetails && null !== input.hashDetails && _io17(input.hashDetails, _vctx)) && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io19(elem, _vctx)));
695
+ const _io30 = (input, _vctx = {}) => (undefined === input.name || "string" === typeof input.name) && (undefined === input.targets || "object" === typeof input.targets && null !== input.targets && false === Array.isArray(input.targets) && _io31(input.targets, _vctx)) && "string" === typeof input.root && (undefined === input.sourceRoot || "string" === typeof input.sourceRoot) && (undefined === input.projectType || "application" === input.projectType || "library" === input.projectType) && (undefined === input.generators || "object" === typeof input.generators && null !== input.generators && false === Array.isArray(input.generators) && _io39(input.generators, _vctx)) && (undefined === input.implicitDependencies || Array.isArray(input.implicitDependencies) && input.implicitDependencies.every(elem => "string" === typeof elem)) && (undefined === input.namedInputs || "object" === typeof input.namedInputs && null !== input.namedInputs && false === Array.isArray(input.namedInputs) && _io41(input.namedInputs, _vctx)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.release || "object" === typeof input.release && null !== input.release && false === Array.isArray(input.release) && _io42(input.release, _vctx)) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && false === Array.isArray(input.metadata) && _io46(input.metadata, _vctx));
696
+ const _io31 = (input, _vctx = {}) => Object.keys(input).every(key => {
697
+ const value = input[key];
698
+ if (undefined === value)
699
+ return true;
700
+ return "object" === typeof value && null !== value && false === Array.isArray(value) && _io32(value, _vctx);
701
+ });
702
+ const _io32 = (input, _vctx = {}) => _ip17(input, _vctx) && _ip18(input, _vctx) && _ip19(input, _vctx) && _ip20(input, _vctx) && _ip21(input, _vctx) && _ip22(input, _vctx) && _ip23(input, _vctx) && _ip24(input, _vctx) && _ip25(input, _vctx) && _ip26(input, _vctx) && _ip27(input, _vctx) && _ip28(input, _vctx) && _ip29(input, _vctx) && _ip30(input, _vctx);
703
+ const _io33 = (input, _vctx = {}) => _ip31(input, _vctx) && (undefined === input.dependencies || "boolean" === typeof input.dependencies) && _ip1(input, _vctx) && (undefined === input.params || "forward" === input.params || "ignore" === input.params) && (undefined === input.options || "forward" === input.options || "ignore" === input.options);
704
+ const _io34 = (input, _vctx = {}) => Object.keys(input).every(key => {
705
+ const value = input[key];
706
+ if (undefined === value)
707
+ return true;
708
+ return true;
709
+ });
710
+ const _io35 = (input, _vctx = {}) => _ip16(input, _vctx) && _ip32(input, _vctx) && (undefined === input.nonAtomizedTarget || "string" === typeof input.nonAtomizedTarget) && (undefined === input.help || "object" === typeof input.help && null !== input.help && _io36(input.help, _vctx)) && Object.keys(input).every(key => {
711
+ if (["description", "technologies", "nonAtomizedTarget", "help"].some(prop => key === prop))
712
+ return true;
713
+ const value = input[key];
714
+ if (undefined === value)
715
+ return true;
716
+ return true;
717
+ });
718
+ const _io36 = (input, _vctx = {}) => _ip6(input, _vctx) && ("object" === typeof input.example && null !== input.example && false === Array.isArray(input.example) && _io37(input.example, _vctx));
719
+ const _io37 = (input, _vctx = {}) => (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && _io38(input.options, _vctx)) && (undefined === input.args || Array.isArray(input.args) && input.args.every(elem => "string" === typeof elem));
720
+ const _io38 = (input, _vctx = {}) => Object.keys(input).every(key => {
721
+ const value = input[key];
722
+ if (undefined === value)
723
+ return true;
724
+ return true;
725
+ });
726
+ const _io39 = (input, _vctx = {}) => Object.keys(input).every(key => {
727
+ const value = input[key];
728
+ if (undefined === value)
729
+ return true;
730
+ return "object" === typeof value && null !== value && false === Array.isArray(value) && _io40(value, _vctx);
731
+ });
732
+ const _io4 = (input, _vctx = {}) => Object.keys(input).every(key => {
733
+ const value = input[key];
734
+ if (undefined === value)
735
+ return true;
736
+ return true;
737
+ });
738
+ const _io40 = (input, _vctx = {}) => Object.keys(input).every(key => {
739
+ const value = input[key];
740
+ if (undefined === value)
741
+ return true;
742
+ return true;
743
+ });
744
+ const _io41 = (input, _vctx = {}) => Object.keys(input).every(key => {
745
+ const value = input[key];
746
+ if (undefined === value)
747
+ return true;
748
+ return Array.isArray(value) && value.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _iu0(elem, _vctx)));
749
+ });
750
+ const _io42 = (input, _vctx = {}) => (undefined === input.version || "object" === typeof input.version && null !== input.version && false === Array.isArray(input.version) && _io43(input.version, _vctx)) && _ip33(input, _vctx);
751
+ const _io43 = (input, _vctx = {}) => (undefined === input.manifestRootsToUpdate || Array.isArray(input.manifestRootsToUpdate) && input.manifestRootsToUpdate.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _io44(elem, _vctx)))) && (undefined === input.currentVersionResolver || "disk" === input.currentVersionResolver || "git-tag" === input.currentVersionResolver || "none" === input.currentVersionResolver || "registry" === input.currentVersionResolver) && (undefined === input.currentVersionResolverMetadata || "object" === typeof input.currentVersionResolverMetadata && null !== input.currentVersionResolverMetadata && false === Array.isArray(input.currentVersionResolverMetadata) && _io38(input.currentVersionResolverMetadata, _vctx)) && (undefined === input.fallbackCurrentVersionResolver || "disk" === input.fallbackCurrentVersionResolver) && (undefined === input.versionPrefix || "" === input.versionPrefix || "=" === input.versionPrefix || "^" === input.versionPrefix || "auto" === input.versionPrefix || "~" === input.versionPrefix) && (undefined === input.versionActions || "string" === typeof input.versionActions) && (undefined === input.versionActionsOptions || "object" === typeof input.versionActionsOptions && null !== input.versionActionsOptions && false === Array.isArray(input.versionActionsOptions) && _io38(input.versionActionsOptions, _vctx)) && (undefined === input.preserveLocalDependencyProtocols || "boolean" === typeof input.preserveLocalDependencyProtocols);
752
+ const _io44 = (input, _vctx = {}) => _ip10(input, _vctx) && "boolean" === typeof input.preserveLocalDependencyProtocols;
753
+ const _io45 = (input, _vctx = {}) => _ip34(input, _vctx) && (null !== input.skipVersionActions && (undefined === input.skipVersionActions || "boolean" === typeof input.skipVersionActions || Array.isArray(input.skipVersionActions) && input.skipVersionActions.every(elem => "string" === typeof elem))) && (undefined === input.versionSchemes || "object" === typeof input.versionSchemes && null !== input.versionSchemes && false === Array.isArray(input.versionSchemes) && _io18(input.versionSchemes, _vctx)) && (undefined === input.repositoryName || "string" === typeof input.repositoryName) && (undefined === input.registryUrl || "string" === typeof input.registryUrl);
754
+ const _io46 = (input, _vctx = {}) => _ip16(input, _vctx) && _ip32(input, _vctx) && (undefined === input.targetGroups || "object" === typeof input.targetGroups && null !== input.targetGroups && false === Array.isArray(input.targetGroups) && _io47(input.targetGroups, _vctx)) && (undefined === input.owners || "object" === typeof input.owners && null !== input.owners && false === Array.isArray(input.owners) && _io48(input.owners, _vctx)) && (undefined === input.js || "object" === typeof input.js && null !== input.js && _io53(input.js, _vctx)) && Object.keys(input).every(key => {
755
+ if (["description", "technologies", "targetGroups", "owners", "js"].some(prop => key === prop))
756
+ return true;
757
+ const value = input[key];
758
+ if (undefined === value)
759
+ return true;
760
+ return true;
761
+ });
762
+ const _io47 = (input, _vctx = {}) => Object.keys(input).every(key => {
763
+ const value = input[key];
764
+ if (undefined === value)
765
+ return true;
766
+ return Array.isArray(value) && value.every(elem => "string" === typeof elem);
767
+ });
768
+ const _io48 = (input, _vctx = {}) => Object.keys(input).every(key => {
769
+ const value = input[key];
770
+ if (undefined === value)
771
+ return true;
772
+ return "object" === typeof value && null !== value && _io49(value, _vctx);
773
+ });
774
+ const _io49 = (input, _vctx = {}) => Array.isArray(input.ownedFiles) && input.ownedFiles.every(elem => "object" === typeof elem && null !== elem && _io50(elem, _vctx));
775
+ const _io5 = (input, _vctx = {}) => "string" === typeof input.json && (undefined === input.fields || Array.isArray(input.fields) && input.fields.every(elem => "string" === typeof elem)) && (undefined === input.excludeFields || Array.isArray(input.excludeFields) && input.excludeFields.every(elem => "string" === typeof elem));
776
+ const _io50 = (input, _vctx = {}) => null !== input.files && undefined !== input.files && (Array.isArray(input.files) && (_ip35(input.files, _vctx) || false)) && (undefined === input.fromConfig || "object" === typeof input.fromConfig && null !== input.fromConfig && _io51(input.fromConfig, _vctx));
777
+ const _io51 = (input, _vctx = {}) => "string" === typeof input.filePath && ("object" === typeof input.location && null !== input.location && _io52(input.location, _vctx));
778
+ const _io52 = (input, _vctx = {}) => "number" === typeof input.startLine && "number" === typeof input.endLine;
779
+ const _io53 = (input, _vctx = {}) => _ip36(input, _vctx) && (undefined === input.packageVersion || "string" === typeof input.packageVersion) && (null !== input.packageExports && (undefined === input.packageExports || "string" === typeof input.packageExports || "object" === typeof input.packageExports && null !== input.packageExports && false === Array.isArray(input.packageExports) && _io54(input.packageExports, _vctx))) && (undefined === input.packageMain || "string" === typeof input.packageMain) && (undefined === input.isInPackageManagerWorkspaces || "boolean" === typeof input.isInPackageManagerWorkspaces);
780
+ const _io54 = (input, _vctx = {}) => Object.keys(input).every(key => {
781
+ const value = input[key];
782
+ if (undefined === value)
783
+ return true;
784
+ return null !== value && undefined !== value && ("string" === typeof value || "object" === typeof value && null !== value && false === Array.isArray(value) && _io55(value, _vctx));
785
+ });
786
+ const _io55 = (input, _vctx = {}) => (undefined === input.types || "string" === typeof input.types) && (undefined === input.require || "string" === typeof input.require) && (undefined === input["import"] || "string" === typeof input["import"]) && (undefined === input.development || "string" === typeof input.development) && (undefined === input["default"] || "string" === typeof input["default"]);
787
+ const _io56 = (input, _vctx = {}) => Object.keys(input).every(key => {
788
+ const value = input[key];
789
+ if (undefined === value)
790
+ return true;
791
+ return "object" === typeof value && null !== value && _io57(value, _vctx);
792
+ });
793
+ const _io57 = (input, _vctx = {}) => _ip37(input, _vctx) && _ip13(input, _vctx) && ("object" === typeof input.data && null !== input.data && _io58(input.data, _vctx));
794
+ const _io58 = (input, _vctx = {}) => _ip38(input, _vctx) && _ip36(input, _vctx) && _ip39(input, _vctx);
795
+ const _io59 = (input, _vctx = {}) => Object.keys(input).every(key => {
796
+ const value = input[key];
797
+ if (undefined === value)
798
+ return true;
799
+ return Array.isArray(value) && value.every(elem => "object" === typeof elem && null !== elem && _io60(elem, _vctx));
800
+ });
801
+ const _io6 = (input, _vctx = {}) => _ip2(input, _vctx) && _ip3(input, _vctx);
802
+ const _io60 = (input, _vctx = {}) => _ip37(input, _vctx) && _ip1(input, _vctx) && "string" === typeof input.source;
803
+ const _io61 = (input, _vctx = {}) => Array.isArray(input.roots) && input.roots.every(elem => "string" === typeof elem) && ("object" === typeof input.tasks && null !== input.tasks && false === Array.isArray(input.tasks) && _io62(input.tasks, _vctx)) && ("object" === typeof input.dependencies && null !== input.dependencies && false === Array.isArray(input.dependencies) && _io47(input.dependencies, _vctx)) && ("object" === typeof input.continuousDependencies && null !== input.continuousDependencies && false === Array.isArray(input.continuousDependencies) && _io47(input.continuousDependencies, _vctx));
804
+ const _io62 = (input, _vctx = {}) => Object.keys(input).every(key => {
805
+ const value = input[key];
806
+ if (undefined === value)
807
+ return true;
808
+ return "object" === typeof value && null !== value && _io63(value, _vctx);
809
+ });
810
+ const _io63 = (input, _vctx = {}) => _ip15(input, _vctx) && ("object" === typeof input.target && null !== input.target && _io64(input.target, _vctx)) && ("object" === typeof input.overrides && null !== input.overrides && false === Array.isArray(input.overrides) && _io38(input.overrides, _vctx)) && (Array.isArray(input.outputs) && input.outputs.every(elem => "string" === typeof elem)) && (undefined === input.projectRoot || "string" === typeof input.projectRoot) && _ip39(input, _vctx) && (undefined === input.hashDetails || "object" === typeof input.hashDetails && null !== input.hashDetails && _io65(input.hashDetails, _vctx)) && (undefined === input.startTime || "number" === typeof input.startTime) && (undefined === input.endTime || "number" === typeof input.endTime) && "boolean" === typeof input.cache && _ip27(input, _vctx) && _ip28(input, _vctx);
811
+ const _io64 = (input, _vctx = {}) => "string" === typeof input.project && _ip1(input, _vctx) && (undefined === input.configuration || "string" === typeof input.configuration);
812
+ const _io65 = (input, _vctx = {}) => _ip6(input, _vctx) && _ip7(input, _vctx) && _ip8(input, _vctx) && _ip9(input, _vctx);
813
+ const _io66 = (input, _vctx = {}) => _ip40(input, _vctx) && _ip41(input, _vctx) && _ip42(input, _vctx) && _ip43(input, _vctx) && _ip44(input, _vctx) && _ip45(input, _vctx) && _ip46(input, _vctx) && _ip47(input, _vctx) && _ip48(input, _vctx) && _ip49(input, _vctx) && _ip50(input, _vctx) && _ip51(input, _vctx) && _ip52(input, _vctx) && _ip53(input, _vctx) && _ip54(input, _vctx) && _ip55(input, _vctx) && _ip56(input, _vctx) && _ip57(input, _vctx) && _ip58(input, _vctx) && _ip59(input, _vctx) && _ip60(input, _vctx) && _ip61(input, _vctx) && _ip62(input, _vctx) && _ip63(input, _vctx) && _ip64(input, _vctx) && _ip65(input, _vctx) && _ip66(input, _vctx) && _ip67(input, _vctx) && _ip68(input, _vctx) && _ip69(input, _vctx);
814
+ const _io67 = (input, _vctx = {}) => Object.keys(input).every(key => {
815
+ const value = input[key];
816
+ if (undefined === value)
817
+ return true;
818
+ return null !== value && undefined !== value && ("*" === value || (Array.isArray(value) && value.every(elem => "string" === typeof elem) || "object" === typeof value && null !== value && false === Array.isArray(value) && _io68(value, _vctx)));
819
+ });
820
+ const _io68 = (input, _vctx = {}) => (_vctx.io68 || (_vctx.io68 = new WeakSet())).has(input) ? true : (_vctx.io68.add(input), (Object.keys(input).every(key => {
821
+ const value = input[key];
822
+ if (undefined === value)
823
+ return true;
824
+ return null !== value && undefined !== value && ("*" === value || (Array.isArray(value) && value.every(elem => "string" === typeof elem) || "object" === typeof value && null !== value && false === Array.isArray(value) && _io68(value, _vctx)));
825
+ })) || (_vctx.io68.delete(input), false));
826
+ const _io69 = (input, _vctx = {}) => Object.keys(input).every(key => {
827
+ const value = input[key];
828
+ if (undefined === value)
829
+ return true;
830
+ return Array.isArray(value) && value.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _iu0(elem, _vctx)));
831
+ });
832
+ const _io7 = (input, _vctx = {}) => _ip2(input, _vctx) && _ip4(input, _vctx);
833
+ const _io70 = (input, _vctx = {}) => Object.keys(input).every(key => {
834
+ const value = input[key];
835
+ if (undefined === value)
836
+ return true;
837
+ return null !== value && undefined !== value && (Array.isArray(value) && value.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io71(elem, _vctx)) || "object" === typeof value && null !== value && false === Array.isArray(value) && _io74(value, _vctx));
838
+ });
839
+ const _io71 = (input, _vctx = {}) => _io73(input, _vctx) && (undefined === input.filter || "object" === typeof input.filter && null !== input.filter && false === Array.isArray(input.filter) && _io72(input.filter, _vctx));
840
+ const _io72 = (input, _vctx = {}) => (undefined === input.plugin || "string" === typeof input.plugin) && (undefined === input.projects || Array.isArray(input.projects) && input.projects.every(elem => "string" === typeof elem)) && _ip17(input, _vctx);
841
+ const _io73 = (input, _vctx = {}) => _ip17(input, _vctx) && _ip18(input, _vctx) && _ip19(input, _vctx) && _ip20(input, _vctx) && _ip21(input, _vctx) && _ip22(input, _vctx) && _ip23(input, _vctx) && _ip24(input, _vctx) && _ip25(input, _vctx) && _ip26(input, _vctx) && _ip27(input, _vctx) && _ip28(input, _vctx) && _ip29(input, _vctx) && _ip30(input, _vctx);
842
+ const _io74 = (input, _vctx = {}) => _io75(input, _vctx) && (null !== input.filter && undefined === input.filter);
843
+ const _io75 = (input, _vctx = {}) => _ip17(input, _vctx) && _ip18(input, _vctx) && _ip19(input, _vctx) && _ip20(input, _vctx) && _ip21(input, _vctx) && _ip22(input, _vctx) && _ip23(input, _vctx) && _ip24(input, _vctx) && _ip25(input, _vctx) && _ip26(input, _vctx) && _ip27(input, _vctx) && _ip28(input, _vctx) && _ip29(input, _vctx) && _ip30(input, _vctx);
844
+ const _io76 = (input, _vctx = {}) => _ip46(input, _vctx);
845
+ const _io77 = (input, _vctx = {}) => (undefined === input.libsDir || "string" === typeof input.libsDir) && (undefined === input.appsDir || "string" === typeof input.appsDir);
846
+ const _io78 = (input, _vctx = {}) => Object.keys(input).every(key => {
847
+ const value = input[key];
848
+ if (undefined === value)
849
+ return true;
850
+ return "object" === typeof value && null !== value && false === Array.isArray(value) && _io79(value, _vctx);
851
+ });
852
+ const _io79 = (input, _vctx = {}) => (undefined === input.runner || "string" === typeof input.runner) && _ip22(input, _vctx);
853
+ const _io8 = (input, _vctx = {}) => _ip2(input, _vctx);
854
+ const _io80 = (input, _vctx = {}) => Object.keys(input).every(key => {
855
+ const value = input[key];
856
+ if (undefined === value)
857
+ return true;
858
+ return "object" === typeof value && null !== value && false === Array.isArray(value) && _io81(value, _vctx);
859
+ });
860
+ const _io81 = (input, _vctx = {}) => Object.keys(input).every(key => {
861
+ const value = input[key];
862
+ if (undefined === value)
863
+ return true;
864
+ return true;
865
+ });
866
+ const _io82 = (input, _vctx = {}) => (undefined === input.packageManager || "bun" === input.packageManager || "npm" === input.packageManager || "pnpm" === input.packageManager || "yarn" === input.packageManager) && (undefined === input.defaultProjectName || "string" === typeof input.defaultProjectName);
867
+ const _io83 = (input, _vctx = {}) => "string" === typeof input.plugin && _ip22(input, _vctx) && (undefined === input.include || Array.isArray(input.include) && input.include.every(elem => "string" === typeof elem)) && (undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every(elem => "string" === typeof elem));
868
+ const _io84 = (input, _vctx = {}) => Object.keys(input).every(key => {
869
+ const value = input[key];
870
+ if (undefined === value)
871
+ return true;
872
+ return "object" === typeof value && null !== value && false === Array.isArray(value) && _io38(value, _vctx);
873
+ });
874
+ const _io85 = (input, _vctx = {}) => _ip38(input, _vctx) && (undefined === input.plugins || "object" === typeof input.plugins && null !== input.plugins && false === Array.isArray(input.plugins) && _io18(input.plugins, _vctx));
875
+ const _io86 = (input, _vctx = {}) => _ip31(input, _vctx) && _ip33(input, _vctx) && (undefined === input.groups || "object" === typeof input.groups && null !== input.groups && false === Array.isArray(input.groups) && _io87(input.groups, _vctx)) && _ip70(input, _vctx) && (undefined === input.changelog || "object" === typeof input.changelog && null !== input.changelog && false === Array.isArray(input.changelog) && _io100(input.changelog, _vctx)) && (undefined === input.version || "object" === typeof input.version && null !== input.version && false === Array.isArray(input.version) && _io102(input.version, _vctx)) && (undefined === input.releaseTag || "object" === typeof input.releaseTag && null !== input.releaseTag && false === Array.isArray(input.releaseTag) && _io103(input.releaseTag, _vctx)) && _ip71(input, _vctx) && (undefined === input.conventionalCommits || "object" === typeof input.conventionalCommits && null !== input.conventionalCommits && false === Array.isArray(input.conventionalCommits) && _io104(input.conventionalCommits, _vctx)) && _ip72(input, _vctx);
876
+ const _io87 = (input, _vctx = {}) => Object.keys(input).every(key => {
877
+ const value = input[key];
878
+ if (undefined === value)
879
+ return true;
880
+ return "object" === typeof value && null !== value && _io88(value, _vctx);
881
+ });
882
+ const _io88 = (input, _vctx = {}) => _ip70(input, _vctx) && _ip3(input, _vctx) && (null !== input.docker && (undefined === input.docker || true === input.docker || "object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) && _io89(input.docker, _vctx))) && (undefined === input.version || "object" === typeof input.version && null !== input.version && false === Array.isArray(input.version) && _io90(input.version, _vctx)) && (null !== input.changelog && (undefined === input.changelog || "boolean" === typeof input.changelog || "object" === typeof input.changelog && null !== input.changelog && false === Array.isArray(input.changelog) && _io92(input.changelog, _vctx))) && (undefined === input.releaseTag || "object" === typeof input.releaseTag && null !== input.releaseTag && false === Array.isArray(input.releaseTag) && _io98(input.releaseTag, _vctx)) && _ip72(input, _vctx);
883
+ const _io89 = (input, _vctx = {}) => _io45(input, _vctx) && _ip73(input, _vctx);
884
+ const _io9 = (input, _vctx = {}) => _ip5(input, _vctx);
885
+ const _io90 = (input, _vctx = {}) => _io91(input, _vctx) && _ip73(input, _vctx);
886
+ const _io91 = (input, _vctx = {}) => _io43(input, _vctx) && ((undefined === input.conventionalCommits || "boolean" === typeof input.conventionalCommits) && _ip34(input, _vctx) && (undefined === input.specifierSource || "conventional-commits" === input.specifierSource || "prompt" === input.specifierSource || "version-plans" === input.specifierSource) && (undefined === input.firstRelease || "boolean" === typeof input.firstRelease) && (undefined === input.deleteVersionPlans || "boolean" === typeof input.deleteVersionPlans) && (undefined === input.updateDependents || "always" === input.updateDependents || "auto" === input.updateDependents || "never" === input.updateDependents) && (undefined === input.logUnchangedProjects || "boolean" === typeof input.logUnchangedProjects) && (null !== input.preserveMatchingDependencyRanges && (undefined === input.preserveMatchingDependencyRanges || "boolean" === typeof input.preserveMatchingDependencyRanges || Array.isArray(input.preserveMatchingDependencyRanges) && input.preserveMatchingDependencyRanges.every(elem => "dependencies" === elem || "devDependencies" === elem || "optionalDependencies" === elem || "peerDependencies" === elem))) && (undefined === input.adjustSemverBumpsForZeroMajorVersion || "boolean" === typeof input.adjustSemverBumpsForZeroMajorVersion) && (undefined === input.applyPreidToDependents || "boolean" === typeof input.applyPreidToDependents));
887
+ const _io92 = (input, _vctx = {}) => null !== input.createRelease && (undefined === input.createRelease || "github" === input.createRelease || "gitlab" === input.createRelease || false === input.createRelease || "object" === typeof input.createRelease && null !== input.createRelease && _iu2(input.createRelease, _vctx)) && (undefined === input.entryWhenNoChanges || false === input.entryWhenNoChanges || "string" === typeof input.entryWhenNoChanges) && (undefined === input.file || false === input.file || "string" === typeof input.file) && (null !== input.renderer && (undefined === input.renderer || "string" === typeof input.renderer || "object" === typeof input.renderer && null !== input.renderer && _io95(input.renderer, _vctx))) && (undefined === input.renderOptions || "object" === typeof input.renderOptions && null !== input.renderOptions && false === Array.isArray(input.renderOptions) && _io97(input.renderOptions, _vctx));
888
+ const _io93 = (input, _vctx = {}) => "github-enterprise-server" === input.provider && _ip74(input, _vctx) && _ip75(input, _vctx);
889
+ const _io94 = (input, _vctx = {}) => "gitlab" === input.provider && _ip74(input, _vctx) && _ip75(input, _vctx);
890
+ const _io95 = (input, _vctx = {}) => "number" === typeof input.length && true && true && _ip13(input, _vctx) && ("object" === typeof input.prototype && null !== input.prototype && false === Array.isArray(input.prototype) && _io96(input.prototype, _vctx));
891
+ const _io96 = (input, _vctx = {}) => true;
892
+ const _io97 = (input, _vctx = {}) => Object.keys(input).every(key => {
893
+ const value = input[key];
894
+ if (undefined === value)
895
+ return true;
896
+ return true;
897
+ });
898
+ const _io98 = (input, _vctx = {}) => _ip76(input, _vctx) && _ip77(input, _vctx) && _ip78(input, _vctx) && _ip79(input, _vctx) && _ip80(input, _vctx);
899
+ const _io99 = (input, _vctx = {}) => undefined === input.ignorePatternsForPlanCheck || Array.isArray(input.ignorePatternsForPlanCheck) && input.ignorePatternsForPlanCheck.every(elem => "string" === typeof elem);
900
+ const _iu0 = (input, _vctx = {}) => (() => {
901
+ if (undefined !== input.json)
902
+ return _io5(input, _vctx);
903
+ else if (undefined !== input.projects)
904
+ return _io6(input, _vctx);
905
+ else if (undefined !== input.runtime)
906
+ return _io11(input, _vctx);
907
+ else if (undefined !== input.externalDependencies)
908
+ return _io12(input, _vctx);
909
+ else if (undefined !== input.dependentTasksOutputFiles)
910
+ return _io13(input, _vctx);
911
+ else if (undefined !== input.env)
912
+ return _io14(input, _vctx);
913
+ else if (undefined !== input.workingDirectory)
914
+ return _io15(input, _vctx);
915
+ else
916
+ return (() => {
917
+ if (_io7(input, _vctx))
918
+ return _io7(input, _vctx);
919
+ if (_io8(input, _vctx))
920
+ return _io8(input, _vctx);
921
+ if (_io9(input, _vctx))
922
+ return _io9(input, _vctx);
923
+ if (_io10(input, _vctx))
924
+ return _io10(input, _vctx);
925
+ return false;
926
+ })();
927
+ })();
928
+ const _iu1 = (input, _vctx = {}) => (() => {
929
+ if ("file" === input.type)
930
+ return _io22(input, _vctx);
931
+ else if ("symlink" === input.type)
932
+ return _io23(input, _vctx);
933
+ else if ("directory" === input.type)
934
+ return _io24(input, _vctx);
935
+ else
936
+ return false;
937
+ })();
938
+ const _iu2 = (input, _vctx = {}) => (() => {
939
+ if ("gitlab" === input.provider)
940
+ return _io94(input, _vctx);
941
+ else if ("github-enterprise-server" === input.provider)
942
+ return _io93(input, _vctx);
943
+ else
944
+ return false;
945
+ })();
946
+ const __is = (input, _vctx = {}) => "object" === typeof input && null !== input && _io0(input, _vctx);
947
+ return input => { input = JSON.parse(input); return __is(input) ? input : null; };
948
+ })()(readFileSync(recordPath(root, target, 'published'), 'utf8'));
949
+ return record === null || record.version !== 1 ? null : record.taskGraph;
950
+ }
951
+ catch {
952
+ return null;
953
+ }
954
+ }
515
955
  function validatedReceipt(root, target) {
516
956
  const path = recordPath(root, target, 'published');
517
957
  let text;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smoothbricks/nx-plugin",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "main": "./loader.js",
@@ -229,9 +229,26 @@
229
229
  "test-shard2",
230
230
  "test-shard3",
231
231
  "test-shard4",
232
- "test-host"
232
+ "test-host",
233
+ "test-pool-silence"
233
234
  ]
234
235
  },
236
+ "test-pool-silence": {
237
+ "executor": "@smoothbricks/nx-plugin:bounded-exec",
238
+ "cache": true,
239
+ "inputs": [
240
+ "default",
241
+ "^dependencyDefault",
242
+ "bunToolchain",
243
+ "{workspaceRoot}/packages/cowshed/crates/cowshed-core/src/port_zero.cjs"
244
+ ],
245
+ "options": {
246
+ "command": "bun test --timeout=0 ./src/executors/bounded-exec/__tests__/cpu-pool.silence.ts",
247
+ "cwd": "{projectRoot}",
248
+ "idleTimeoutMs": 180000,
249
+ "killAfterMs": 10000
250
+ }
251
+ },
235
252
  "test-shard1": {
236
253
  "executor": "@smoothbricks/nx-plugin:bounded-exec",
237
254
  "cache": true,
@@ -10,6 +10,7 @@ import {
10
10
  readlinkSync,
11
11
  readSync,
12
12
  realpathSync,
13
+ rmSync,
13
14
  } from 'node:fs';
14
15
  import { isAbsolute, join, relative } from 'node:path';
15
16
  import type { Task } from 'nx/src/config/task-graph';
@@ -378,6 +379,46 @@ export function producerOutputPaths(root: string, tasks: readonly Task[], expand
378
379
  for (const task of tasks) for (const path of expand(root, task.outputs)) visit(path);
379
380
  return [...paths].sort();
380
381
  }
382
+ /**
383
+ * Remove what a producer's previous receipt declared as task outputs and its current task graph no longer declares,
384
+ * inside the declaring task's project root. A layout change (an output moved, a target renamed) otherwise leaves the
385
+ * old layout's files where a package's published `files` still packs them, so a consumer's capture hashes them as the
386
+ * producer's tools and ships them. A previously declared directory that holds a currently declared output loses only
387
+ * its other entries. A previous task that left this graph while its target still exists is not this producer's to
388
+ * clean: `defined` says whether a task's target still exists. Returns the removed paths, relative to `root`.
389
+ */
390
+ export function removeOrphanedOutputs(
391
+ root: string,
392
+ previous: readonly Task[],
393
+ current: readonly Task[],
394
+ expand: typeof expandOutputs,
395
+ defined: (task: Task) => boolean,
396
+ ): string[] {
397
+ const declared = current.flatMap((task) => expand(root, task.outputs));
398
+ const currentIds = new Set(current.map((task) => task.id));
399
+ const removed: string[] = [];
400
+ function prune(path: string): void {
401
+ if (declared.some((output) => path === output || path.startsWith(`${output}/`))) return;
402
+ const stats = lstatSync(join(root, path), { throwIfNoEntry: false });
403
+ if (stats === undefined) return;
404
+ if (!declared.some((output) => output.startsWith(`${path}/`))) {
405
+ rmSync(join(root, path), { recursive: true, force: true });
406
+ removed.push(path);
407
+ return;
408
+ }
409
+ if (stats.isDirectory()) for (const name of readdirSync(join(root, path))) prune(join(path, name));
410
+ }
411
+ for (const task of previous) {
412
+ if (!currentIds.has(task.id) && defined(task)) continue;
413
+ const project = task.projectRoot ?? '';
414
+ for (const output of expand(root, task.outputs)) {
415
+ if (isAbsolute(output) || output.split('/').includes('..')) continue;
416
+ if (project !== '' && project !== '.' && output !== project && !output.startsWith(`${project}/`)) continue;
417
+ prune(output);
418
+ }
419
+ }
420
+ return removed.sort();
421
+ }
381
422
  export function providerReceipt(
382
423
  root: string,
383
424
  taskId: string,