pixelkiln 0.146.0 → 0.147.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/dist/index.d.cts CHANGED
@@ -33731,6 +33731,13 @@ declare function runPicker(provider: Provider, lock: Lock, lockPath: string, opt
33731
33731
  * the rest. `gen --yes` sets this so an unattended run cannot block.
33732
33732
  */
33733
33733
  autoAcceptSingle?: boolean;
33734
+ /**
33735
+ * Apply `index: 0` for every asset in review, several candidates or one,
33736
+ * and serve no page at all. `--accept-first` sets this for a run nobody
33737
+ * is watching; the first candidate is the provider's first, not a judged
33738
+ * best one.
33739
+ */
33740
+ acceptFirst?: boolean;
33734
33741
  /** Regenerates one asset from the page; without it the page offers no reroll. */
33735
33742
  reroll?: RerollAsset;
33736
33743
  }): Promise<PickResult>;
package/dist/index.d.ts CHANGED
@@ -33731,6 +33731,13 @@ declare function runPicker(provider: Provider, lock: Lock, lockPath: string, opt
33731
33731
  * the rest. `gen --yes` sets this so an unattended run cannot block.
33732
33732
  */
33733
33733
  autoAcceptSingle?: boolean;
33734
+ /**
33735
+ * Apply `index: 0` for every asset in review, several candidates or one,
33736
+ * and serve no page at all. `--accept-first` sets this for a run nobody
33737
+ * is watching; the first candidate is the provider's first, not a judged
33738
+ * best one.
33739
+ */
33740
+ acceptFirst?: boolean;
33734
33741
  /** Regenerates one asset from the page; without it the page offers no reroll. */
33735
33742
  reroll?: RerollAsset;
33736
33743
  }): Promise<PickResult>;
package/dist/index.js CHANGED
@@ -24455,12 +24455,12 @@ async function runPicker(provider, lock, lockPath, opts = {}) {
24455
24455
  });
24456
24456
  if (!session) return { selected: 0, skipped: 0 };
24457
24457
  let autoSelected = 0;
24458
- if (opts.autoAcceptSingle) {
24459
- const singles = session.groups.filter((g) => g.mode === "frame-set" || g.frameUrls.length === 1);
24458
+ if (opts.acceptFirst || opts.autoAcceptSingle) {
24459
+ const singles = opts.acceptFirst ? session.groups : session.groups.filter((g) => g.mode === "frame-set" || g.frameUrls.length === 1);
24460
24460
  if (singles.length) {
24461
24461
  const res = await session.apply({ selections: singles.map((g) => ({ key: g.key, index: 0 })) }, lockPath);
24462
24462
  autoSelected = res.selected;
24463
- log(` --yes: accepted ${res.selected} single-candidate asset(s)`);
24463
+ log(opts.acceptFirst ? ` --accept-first: accepted the first candidate of ${res.selected} asset(s)` : ` --yes: accepted ${res.selected} single-candidate asset(s)`);
24464
24464
  const rest = session.groups.filter((g) => !singles.includes(g)).map((g) => g.key);
24465
24465
  session = rest.length ? await prepareReview(provider, lock, { onProgress: log, keys: rest, specs: opts.specs, lockPath }) : null;
24466
24466
  if (!session) return { selected: autoSelected, skipped: 0 };