@storyshelf/core 0.7.0 → 0.8.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/adapter/capture-queue.d.mts +0 -2
- package/dist/adapter/capture-runner.d.mts +9 -4
- package/dist/adapter/capture-runner.mjs +6 -2
- package/dist/adapter/database.d.mts +63 -3
- package/dist/adapter/database.mjs +4 -3
- package/dist/adapter/database.mjs.map +1 -1
- package/dist/adapter/design.d.mts +0 -2
- package/dist/adapter/design.mjs +1 -2
- package/dist/adapter/email-sender.d.mts +0 -2
- package/dist/adapter/metadata.d.mts +0 -2
- package/dist/adapter/oauth.d.mts +0 -2
- package/dist/adapter/setup.d.mts +0 -2
- package/dist/adapter/setup.mjs +1 -2
- package/dist/adapter/storage.d.mts +1 -3
- package/dist/adapter/webhook-events.d.mts +0 -2
- package/dist/adapter/webhook-events.mjs +12 -13
- package/dist/adapter/webhook-events.mjs.map +1 -1
- package/dist/adapters/capture-target-offers.d.mts +0 -2
- package/dist/adapters/capture-target-offers.mjs +1 -2
- package/dist/adapters/capture-target.d.mts +0 -2
- package/dist/adapters/capture-target.mjs +1 -2
- package/dist/adapters/notifier/build-comment.d.mts +0 -2
- package/dist/adapters/notifier/build-comment.mjs +1 -2
- package/dist/adapters/notifier/build-state.d.mts +0 -2
- package/dist/adapters/notifier/build-state.mjs +1 -2
- package/dist/adapters/notifier/events.d.mts +0 -2
- package/dist/adapters/notifier/events.mjs +1 -2
- package/dist/adapters/notifier/format.d.mts +0 -2
- package/dist/adapters/notifier/format.mjs +1 -2
- package/dist/adapters/notifier/provider.d.mts +0 -2
- package/dist/adapters/notifier/provider.mjs +1 -2
- package/dist/adapters/notifier/state.d.mts +0 -2
- package/dist/adapters/notifier/state.mjs +1 -2
- package/dist/adapters/notifier/types.d.mts +0 -2
- package/dist/adapters/remote-browser.d.mts +112 -31
- package/dist/adapters/remote-browser.mjs +132 -34
- package/dist/adapters/remote-browser.mjs.map +1 -1
- package/dist/adapters/remote-lease-attempt.mjs +39 -0
- package/dist/adapters/remote-lease-attempt.mjs.map +1 -0
- package/dist/adapters/remote-lease-error.d.mts +25 -0
- package/dist/adapters/remote-lease-error.mjs +54 -0
- package/dist/adapters/remote-lease-error.mjs.map +1 -0
- package/dist/adapters/remote-lease-held.d.mts +15 -0
- package/dist/adapters/remote-lease-held.mjs +86 -0
- package/dist/adapters/remote-lease-held.mjs.map +1 -0
- package/dist/adapters/remote-lease-shutdown.d.mts +12 -0
- package/dist/adapters/remote-lease-shutdown.mjs +32 -0
- package/dist/adapters/remote-lease-shutdown.mjs.map +1 -0
- package/dist/adapters/remote-lease.d.mts +39 -0
- package/dist/adapters/remote-lease.mjs +175 -0
- package/dist/adapters/remote-lease.mjs.map +1 -0
- package/dist/adapters/remote-limiter.mjs +121 -0
- package/dist/adapters/remote-limiter.mjs.map +1 -0
- package/dist/adapters/remote-pool.d.mts +56 -0
- package/dist/adapters/remote-pool.mjs +195 -0
- package/dist/adapters/remote-pool.mjs.map +1 -0
- package/dist/adapters/render-runs.d.mts +0 -2
- package/dist/adapters/render-runs.mjs +1 -2
- package/dist/adapters/setup-runner.d.mts +0 -2
- package/dist/adapters/setup-runner.mjs +1 -2
- package/dist/adapters/sources.d.mts +0 -2
- package/dist/adapters/sources.mjs +1 -2
- package/dist/adapters/validate.d.mts +0 -2
- package/dist/adapters/validate.mjs +2 -2
- package/dist/adapters/validate.mjs.map +1 -1
- package/dist/ai.d.mts +0 -2
- package/dist/ai.mjs +1 -2
- package/dist/auth.d.mts +0 -2
- package/dist/auth.mjs +1 -2
- package/dist/brand-packs.d.mts +0 -2
- package/dist/brand-packs.mjs +0 -1
- package/dist/capture/a11y/axe-source.d.mts +0 -2
- package/dist/capture/a11y/axe-source.mjs +1 -2
- package/dist/capture/a11y/in-page.d.mts +1 -3
- package/dist/capture/a11y/in-page.mjs +3 -4
- package/dist/capture/a11y/in-page.mjs.map +1 -1
- package/dist/capture/a11y/map.d.mts +0 -2
- package/dist/capture/a11y/map.mjs +1 -2
- package/dist/capture/a11y/options.d.mts +0 -2
- package/dist/capture/a11y/options.mjs +1 -2
- package/dist/capture/adapter.d.mts +5 -2
- package/dist/capture/adapter.mjs +1 -2
- package/dist/capture/adapter.mjs.map +1 -1
- package/dist/capture/affected.d.mts +0 -2
- package/dist/capture/affected.mjs +1 -2
- package/dist/capture/attempt-logger.mjs +1 -2
- package/dist/capture/browsers.d.mts +0 -2
- package/dist/capture/browsers.mjs +1 -2
- package/dist/capture/build-state/deliver.d.mts +0 -2
- package/dist/capture/build-state/deliver.mjs +1 -2
- package/dist/capture/build-state/notify-job.d.mts +0 -2
- package/dist/capture/build-state/notify-job.mjs +1 -2
- package/dist/capture/build-state/publisher.d.mts +0 -2
- package/dist/capture/build-state/publisher.mjs +1 -2
- package/dist/capture/build-state/resume.d.mts +0 -2
- package/dist/capture/build-state/resume.mjs +1 -2
- package/dist/capture/build-state/types.d.mts +1 -3
- package/dist/capture/catalog/catalogue.d.mts +0 -2
- package/dist/capture/catalog/catalogue.mjs +1 -2
- package/dist/capture/catalog/components.d.mts +0 -2
- package/dist/capture/catalog/components.mjs +1 -2
- package/dist/capture/catalog/history.d.mts +0 -2
- package/dist/capture/catalog/history.mjs +1 -2
- package/dist/capture/catalog/hook.d.mts +0 -2
- package/dist/capture/catalog/hook.mjs +1 -2
- package/dist/capture/catalog/index.d.mts +2 -2
- package/dist/capture/catalog/load.d.mts +0 -2
- package/dist/capture/catalog/load.mjs +1 -2
- package/dist/capture/catalog/parse.d.mts +0 -2
- package/dist/capture/catalog/parse.mjs +1 -2
- package/dist/capture/catalog/read.d.mts +6 -3
- package/dist/capture/catalog/read.mjs +14 -8
- package/dist/capture/catalog/read.mjs.map +1 -1
- package/dist/capture/catalog/types.d.mts +0 -2
- package/dist/capture/comparison-reference.d.mts +27 -0
- package/dist/capture/comparison-reference.mjs +75 -0
- package/dist/capture/comparison-reference.mjs.map +1 -0
- package/dist/capture/consumer/capture-handler.d.mts +1 -3
- package/dist/capture/consumer/capture-handler.mjs +1 -2
- package/dist/capture/consumer/idle.d.mts +0 -2
- package/dist/capture/consumer/idle.mjs +1 -2
- package/dist/capture/consumer/index.d.mts +0 -2
- package/dist/capture/consumer/index.mjs +1 -2
- package/dist/capture/consumer/loop.mjs +1 -2
- package/dist/capture/consumer/metrics.d.mts +0 -2
- package/dist/capture/consumer/metrics.mjs +1 -2
- package/dist/capture/consumer/retry.d.mts +0 -2
- package/dist/capture/consumer/retry.mjs +1 -2
- package/dist/capture/consumer/run-job.mjs +1 -2
- package/dist/capture/consumer/startup.mjs +1 -2
- package/dist/capture/consumer/types.d.mts +0 -2
- package/dist/capture/crash-failure.d.mts +0 -2
- package/dist/capture/crash-failure.mjs +1 -2
- package/dist/capture/db-queue/cadence.d.mts +0 -2
- package/dist/capture/db-queue/cadence.mjs +1 -2
- package/dist/capture/db-queue/claim.d.mts +0 -2
- package/dist/capture/db-queue/claim.mjs +20 -4
- package/dist/capture/db-queue/claim.mjs.map +1 -1
- package/dist/capture/db-queue/clock.mjs +1 -2
- package/dist/capture/db-queue/codec.mjs +1 -2
- package/dist/capture/db-queue/index.d.mts +0 -2
- package/dist/capture/db-queue/index.mjs +3 -3
- package/dist/capture/db-queue/index.mjs.map +1 -1
- package/dist/capture/db-queue/keeper.d.mts +0 -2
- package/dist/capture/db-queue/keeper.mjs +1 -2
- package/dist/capture/db-queue/lease.mjs +1 -2
- package/dist/capture/db-queue/lifecycle.mjs +1 -2
- package/dist/capture/db-queue/operations.mjs +1 -2
- package/dist/capture/db-queue/poll-loop.d.mts +0 -2
- package/dist/capture/db-queue/poll-loop.mjs +1 -2
- package/dist/capture/db-queue/poll.d.mts +0 -2
- package/dist/capture/db-queue/poll.mjs +1 -2
- package/dist/capture/db-queue/timers.d.mts +0 -2
- package/dist/capture/db-queue/timers.mjs +1 -2
- package/dist/capture/db-queue/types.d.mts +0 -2
- package/dist/capture/db-queue/types.mjs +1 -2
- package/dist/capture/db-queue/types.mjs.map +1 -1
- package/dist/capture/db-queue/wake.mjs +1 -2
- package/dist/capture/design.mjs +1 -2
- package/dist/capture/diff-record.mjs +1 -2
- package/dist/capture/dispatch.d.mts +1 -3
- package/dist/capture/dispatch.mjs +17 -5
- package/dist/capture/dispatch.mjs.map +1 -1
- package/dist/capture/enrich.mjs +1 -2
- package/dist/capture/failure-sets.mjs +1 -2
- package/dist/capture/fingerprint.d.mts +0 -2
- package/dist/capture/fingerprint.mjs +1 -2
- package/dist/capture/forked/channel.d.mts +0 -2
- package/dist/capture/forked/child.d.mts +0 -2
- package/dist/capture/forked/child.mjs +1 -2
- package/dist/capture/forked/crash-tracker.mjs +1 -2
- package/dist/capture/forked/decision.d.mts +0 -2
- package/dist/capture/forked/decision.mjs +1 -2
- package/dist/capture/forked/exit.mjs +1 -2
- package/dist/capture/forked/fork.d.mts +0 -2
- package/dist/capture/forked/fork.mjs +1 -2
- package/dist/capture/forked/forked-capture.d.mts +0 -2
- package/dist/capture/forked/forked-capture.mjs +1 -2
- package/dist/capture/forked/lease-book.mjs +1 -2
- package/dist/capture/forked/protocol.d.mts +0 -2
- package/dist/capture/forked/protocol.mjs +1 -2
- package/dist/capture/forked/runs.mjs +1 -2
- package/dist/capture/guards.mjs +1 -2
- package/dist/capture/ignore-regions.d.mts +36 -0
- package/dist/capture/ignore-regions.mjs +65 -0
- package/dist/capture/ignore-regions.mjs.map +1 -0
- package/dist/capture/isolate.mjs +1 -2
- package/dist/capture/job-lease.d.mts +0 -2
- package/dist/capture/job-lease.mjs +1 -2
- package/dist/capture/matrix.mjs +4 -4
- package/dist/capture/matrix.mjs.map +1 -1
- package/dist/capture/modes.d.mts +0 -2
- package/dist/capture/modes.mjs +2 -3
- package/dist/capture/modes.mjs.map +1 -1
- package/dist/capture/orchestrator.d.mts +0 -2
- package/dist/capture/orchestrator.mjs +2 -3
- package/dist/capture/pipeline.d.mts +0 -2
- package/dist/capture/pipeline.mjs +37 -6
- package/dist/capture/pipeline.mjs.map +1 -1
- package/dist/capture/progress.d.mts +0 -2
- package/dist/capture/progress.mjs +1 -2
- package/dist/capture/publish/accept.d.mts +0 -2
- package/dist/capture/publish/accept.mjs +1 -2
- package/dist/capture/publish/complete.d.mts +1 -3
- package/dist/capture/publish/complete.mjs +1 -2
- package/dist/capture/publish/extract.d.mts +0 -2
- package/dist/capture/publish/extract.mjs +6 -5
- package/dist/capture/publish/extract.mjs.map +1 -1
- package/dist/capture/publish/handler.d.mts +1 -3
- package/dist/capture/publish/handler.mjs +1 -2
- package/dist/capture/publish/index.d.mts +2 -1
- package/dist/capture/publish/invalid-zip.d.mts +8 -0
- package/dist/capture/publish/invalid-zip.mjs +11 -0
- package/dist/capture/publish/invalid-zip.mjs.map +1 -0
- package/dist/capture/publish/limits.d.mts +0 -2
- package/dist/capture/publish/limits.mjs +1 -2
- package/dist/capture/publish/published.d.mts +0 -2
- package/dist/capture/publish/published.mjs +1 -2
- package/dist/capture/publish/run.d.mts +1 -3
- package/dist/capture/publish/run.mjs +1 -2
- package/dist/capture/rediff.d.mts +1 -3
- package/dist/capture/rediff.mjs +19 -6
- package/dist/capture/rediff.mjs.map +1 -1
- package/dist/capture/render.mjs +1 -2
- package/dist/capture/render.mjs.map +1 -1
- package/dist/capture/scratch.d.mts +0 -2
- package/dist/capture/scratch.mjs +2 -4
- package/dist/capture/scratch.mjs.map +1 -1
- package/dist/capture/shard-plan.mjs +1 -2
- package/dist/capture/shards/context.mjs +3 -3
- package/dist/capture/shards/context.mjs.map +1 -1
- package/dist/capture/shards/execute.mjs +4 -3
- package/dist/capture/shards/execute.mjs.map +1 -1
- package/dist/capture/shards/fan-out.mjs +1 -2
- package/dist/capture/shards/history.mjs +1 -2
- package/dist/capture/shards/reduce.mjs +1 -2
- package/dist/capture/sizing.d.mts +0 -2
- package/dist/capture/sizing.mjs +1 -2
- package/dist/capture/skip-checks.mjs +1 -2
- package/dist/capture/statics.d.mts +0 -2
- package/dist/capture/statics.mjs +2 -4
- package/dist/capture/statics.mjs.map +1 -1
- package/dist/capture/storybook-urls.d.mts +0 -2
- package/dist/capture/storybook-urls.mjs +3 -3
- package/dist/capture/storybook-urls.mjs.map +1 -1
- package/dist/capture/storybook.d.mts +0 -2
- package/dist/capture/storybook.mjs +8 -4
- package/dist/capture/storybook.mjs.map +1 -1
- package/dist/capture/target.mjs +1 -2
- package/dist/capture/targets.d.mts +0 -2
- package/dist/capture/targets.mjs +1 -2
- package/dist/capture/tests.d.mts +0 -2
- package/dist/capture/tests.mjs +13 -3
- package/dist/capture/tests.mjs.map +1 -1
- package/dist/capture/token-chunks.mjs +24 -7
- package/dist/capture/token-chunks.mjs.map +1 -1
- package/dist/capture.d.mts +5 -2
- package/dist/capture.mjs +5 -2
- package/dist/config.d.mts +16 -3
- package/dist/config.mjs +6 -3
- package/dist/config.mjs.map +1 -1
- package/dist/diff.d.mts +0 -2
- package/dist/diff.mjs +1 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/insights/budget.d.mts +0 -2
- package/dist/insights/budget.mjs +1 -2
- package/dist/insights/envelope.d.mts +0 -2
- package/dist/insights/envelope.mjs +1 -2
- package/dist/insights/evidence-health.d.mts +0 -2
- package/dist/insights/evidence-health.mjs +1 -2
- package/dist/insights/evidence.d.mts +0 -2
- package/dist/insights/evidence.mjs +1 -2
- package/dist/insights/hash.d.mts +0 -2
- package/dist/insights/hash.mjs +1 -2
- package/dist/insights/limits.d.mts +0 -2
- package/dist/insights/limits.mjs +1 -2
- package/dist/insights/prompts/v1.d.mts +0 -2
- package/dist/insights/prompts/v1.mjs +1 -2
- package/dist/insights/redact.d.mts +0 -2
- package/dist/insights/redact.mjs +1 -2
- package/dist/insights/text.mjs +1 -2
- package/dist/logger.d.mts +0 -2
- package/dist/logger.mjs +1 -2
- package/dist/models/ai-budget-alert.d.mts +0 -2
- package/dist/models/ai-budget-alert.mjs +1 -2
- package/dist/models/ai-usage.d.mts +0 -2
- package/dist/models/ai-usage.mjs +1 -2
- package/dist/models/baseline-approval.d.mts +18 -0
- package/dist/models/baseline-approval.mjs +41 -0
- package/dist/models/baseline-approval.mjs.map +1 -0
- package/dist/models/baseline-archive.d.mts +0 -2
- package/dist/models/baseline-archive.mjs +1 -2
- package/dist/models/baseline-atomic.mjs +66 -0
- package/dist/models/baseline-atomic.mjs.map +1 -0
- package/dist/models/baseline-conflict.d.mts +6 -0
- package/dist/models/baseline-conflict.mjs +9 -0
- package/dist/models/baseline-conflict.mjs.map +1 -0
- package/dist/models/baseline-export.d.mts +0 -2
- package/dist/models/baseline-export.mjs +1 -2
- package/dist/models/baseline-import.mjs +1 -2
- package/dist/models/baseline-origin.d.mts +16 -0
- package/dist/models/baseline-origin.mjs +35 -0
- package/dist/models/baseline-origin.mjs.map +1 -0
- package/dist/models/baseline-status.d.mts +0 -2
- package/dist/models/baseline-status.mjs +1 -2
- package/dist/models/baseline-transfer.d.mts +1 -2
- package/dist/models/baseline-transfer.mjs +30 -2
- package/dist/models/baseline-transfer.mjs.map +1 -1
- package/dist/models/baseline.d.mts +5 -2
- package/dist/models/baseline.mjs +91 -12
- package/dist/models/baseline.mjs.map +1 -1
- package/dist/models/build-component.d.mts +0 -2
- package/dist/models/build-component.mjs +1 -2
- package/dist/models/build-review-status.d.mts +0 -2
- package/dist/models/build-review-status.mjs +1 -2
- package/dist/models/build-review.d.mts +0 -2
- package/dist/models/build-review.mjs +1 -2
- package/dist/models/build.d.mts +1 -3
- package/dist/models/build.mjs +14 -15
- package/dist/models/build.mjs.map +1 -1
- package/dist/models/capture-attempt.d.mts +0 -2
- package/dist/models/capture-attempt.mjs +1 -2
- package/dist/models/capture-job.d.mts +0 -2
- package/dist/models/capture-job.mjs +1 -2
- package/dist/models/capture-log.d.mts +0 -2
- package/dist/models/capture-log.mjs +1 -2
- package/dist/models/capture-shard.d.mts +0 -2
- package/dist/models/capture-shard.mjs +1 -2
- package/dist/models/changeset.d.mts +0 -2
- package/dist/models/changeset.mjs +1 -2
- package/dist/models/columns.mjs +1 -2
- package/dist/models/comment.d.mts +0 -2
- package/dist/models/comment.mjs +1 -2
- package/dist/models/component.d.mts +0 -2
- package/dist/models/component.mjs +1 -2
- package/dist/models/connections.d.mts +0 -2
- package/dist/models/connections.mjs +1 -2
- package/dist/models/content-ref.d.mts +0 -2
- package/dist/models/content-ref.mjs +1 -2
- package/dist/models/credentials.d.mts +0 -2
- package/dist/models/credentials.mjs +1 -2
- package/dist/models/design-credentials.d.mts +0 -2
- package/dist/models/design-credentials.mjs +1 -2
- package/dist/models/design-health.d.mts +0 -2
- package/dist/models/design-health.mjs +1 -2
- package/dist/models/design-nodes.d.mts +2 -4
- package/dist/models/design-nodes.mjs +1 -2
- package/dist/models/design-renders.mjs +1 -2
- package/dist/models/design-resolve.d.mts +0 -2
- package/dist/models/design-resolve.mjs +1 -2
- package/dist/models/design.d.mts +0 -2
- package/dist/models/design.mjs +1 -2
- package/dist/models/inherited-ratio.d.mts +0 -2
- package/dist/models/inherited-ratio.mjs +1 -2
- package/dist/models/insight.d.mts +0 -2
- package/dist/models/insight.mjs +1 -2
- package/dist/models/label.d.mts +0 -2
- package/dist/models/label.mjs +1 -2
- package/dist/models/member.d.mts +0 -2
- package/dist/models/member.mjs +1 -2
- package/dist/models/notification-channel.d.mts +0 -2
- package/dist/models/notification-channel.mjs +1 -2
- package/dist/models/notification-subscription.d.mts +0 -2
- package/dist/models/notification-subscription.mjs +1 -2
- package/dist/models/project-group-mapping.d.mts +0 -2
- package/dist/models/project-group-mapping.mjs +1 -2
- package/dist/models/project.d.mts +0 -2
- package/dist/models/project.mjs +1 -2
- package/dist/models/public-origin.d.mts +0 -2
- package/dist/models/public-origin.mjs +1 -2
- package/dist/models/review-switch-off.d.mts +0 -2
- package/dist/models/review-switch-off.mjs +1 -2
- package/dist/models/site-settings.d.mts +0 -2
- package/dist/models/site-settings.mjs +1 -2
- package/dist/models/snapshot.d.mts +3 -2
- package/dist/models/snapshot.mjs +4 -2
- package/dist/models/snapshot.mjs.map +1 -1
- package/dist/models/token.d.mts +0 -2
- package/dist/models/token.mjs +1 -2
- package/dist/models/usage.d.mts +0 -2
- package/dist/models/usage.mjs +1 -2
- package/dist/models/user.d.mts +0 -2
- package/dist/models/user.mjs +1 -2
- package/dist/models/webhook.d.mts +0 -2
- package/dist/models/webhook.mjs +1 -2
- package/dist/models.d.mts +5 -2
- package/dist/models.mjs +5 -2
- package/dist/options.d.mts +0 -2
- package/dist/options.mjs +2 -4
- package/dist/options.mjs.map +1 -1
- package/dist/paths.d.mts +3 -3
- package/dist/paths.mjs +7 -3
- package/dist/paths.mjs.map +1 -1
- package/dist/retention/ai.d.mts +1 -3
- package/dist/retention/ai.mjs +0 -1
- package/dist/retention/pending.mjs +1 -2
- package/dist/retention/published-gzip-sweep.mjs +28 -0
- package/dist/retention/published-gzip-sweep.mjs.map +1 -0
- package/dist/retention/screenshot-sweep.d.mts +0 -2
- package/dist/retention/screenshot-sweep.mjs +1 -2
- package/dist/retention.d.mts +0 -2
- package/dist/retention.mjs +5 -2
- package/dist/retention.mjs.map +1 -1
- package/dist/schema/baseline.d.mts +2 -2
- package/dist/schema/build-component.d.mts +0 -2
- package/dist/schema/build-review.d.mts +0 -2
- package/dist/schema/build.d.mts +0 -2
- package/dist/schema/capture-attempt.d.mts +0 -2
- package/dist/schema/capture-job.d.mts +0 -2
- package/dist/schema/capture-shard.d.mts +0 -2
- package/dist/schema/comment.d.mts +0 -2
- package/dist/schema/connection.d.mts +0 -2
- package/dist/schema/content-ref.d.mts +0 -2
- package/dist/schema/design.d.mts +0 -2
- package/dist/schema/insight.d.mts +0 -2
- package/dist/schema/label.d.mts +0 -2
- package/dist/schema/member.d.mts +0 -2
- package/dist/schema/notification.d.mts +0 -2
- package/dist/schema/project-group-mapping.d.mts +0 -2
- package/dist/schema/project.d.mts +0 -2
- package/dist/schema/site-setting.d.mts +0 -2
- package/dist/schema/snapshot.d.mts +5 -2
- package/dist/schema/token.d.mts +0 -2
- package/dist/schema/usage.d.mts +0 -2
- package/dist/schema/user.d.mts +0 -2
- package/dist/schema/webhook.d.mts +0 -2
- package/dist/schema.d.mts +4 -6
- package/dist/serverless.d.mts +0 -2
- package/dist/serverless.mjs +1 -2
- package/dist/test-helpers/build-reference-contract.d.mts +14 -0
- package/dist/test-helpers/build-reference-contract.mjs +66 -0
- package/dist/test-helpers/build-reference-contract.mjs.map +1 -0
- package/dist/test-helpers/create-project.d.mts +0 -2
- package/dist/test-helpers/create-project.mjs +1 -2
- package/dist/test-helpers/database-contract.d.mts +0 -2
- package/dist/test-helpers/database-contract.mjs +37 -2
- package/dist/test-helpers/database-contract.mjs.map +1 -1
- package/dist/test-helpers/deferred.d.mts +0 -2
- package/dist/test-helpers/deferred.mjs +1 -2
- package/dist/test-helpers/design-contract.d.mts +0 -2
- package/dist/test-helpers/design-contract.mjs +1 -2
- package/dist/test-helpers/fake-adapters.d.mts +0 -2
- package/dist/test-helpers/fake-adapters.mjs +1 -2
- package/dist/test-helpers/fake-database.d.mts +0 -2
- package/dist/test-helpers/fake-database.mjs +7 -2
- package/dist/test-helpers/fake-database.mjs.map +1 -1
- package/dist/test-helpers/fake-design.d.mts +0 -2
- package/dist/test-helpers/fake-design.mjs +1 -2
- package/dist/test-helpers/fake-notifier.d.mts +0 -2
- package/dist/test-helpers/fake-notifier.mjs +1 -2
- package/dist/test-helpers/fake-storage.d.mts +0 -2
- package/dist/test-helpers/fake-storage.mjs +1 -2
- package/dist/test-helpers/fake-tables.mjs +5 -2
- package/dist/test-helpers/fake-tables.mjs.map +1 -1
- package/dist/test-helpers/manual-clock.d.mts +0 -2
- package/dist/test-helpers/manual-clock.mjs +1 -2
- package/dist/test-helpers/notifier-contract.d.mts +0 -2
- package/dist/test-helpers/notifier-contract.mjs +1 -2
- package/dist/test-helpers/queue-contract.d.mts +0 -2
- package/dist/test-helpers/queue-contract.mjs +1 -2
- package/dist/test-helpers/queue-multi-instance.d.mts +0 -2
- package/dist/test-helpers/queue-multi-instance.mjs +1 -2
- package/dist/test-helpers/runner-contract.d.mts +0 -2
- package/dist/test-helpers/runner-contract.mjs +1 -2
- package/dist/test-helpers/sql-chunks.mjs +2 -2
- package/dist/test-helpers/sql-chunks.mjs.map +1 -1
- package/dist/test-helpers/storage-contract.d.mts +0 -2
- package/dist/test-helpers/storage-contract.mjs +1 -2
- package/dist/test-helpers.d.mts +2 -1
- package/dist/test-helpers.mjs +2 -1
- package/dist/tracing.mjs +36 -6
- package/dist/tracing.mjs.map +1 -1
- package/dist/types.d.mts +0 -2
- package/dist/types.mjs +1 -2
- package/dist/urls.d.mts +0 -2
- package/dist/urls.mjs +1 -2
- package/dist/utils/adaptive-concurrency.d.mts +0 -2
- package/dist/utils/adaptive-concurrency.mjs +1 -2
- package/dist/utils/connect-retry.d.mts +2 -2
- package/dist/utils/connect-retry.mjs +2 -3
- package/dist/utils/connect-retry.mjs.map +1 -1
- package/dist/utils/encrypt.d.mts +0 -2
- package/dist/utils/encrypt.mjs +1 -2
- package/dist/utils/environment.d.mts +0 -2
- package/dist/utils/environment.mjs +1 -2
- package/dist/utils/hash.d.mts +0 -2
- package/dist/utils/hash.mjs +1 -2
- package/dist/utils/http.d.mts +13 -3
- package/dist/utils/http.mjs +79 -17
- package/dist/utils/http.mjs.map +1 -1
- package/dist/utils/map-adaptive.d.mts +0 -2
- package/dist/utils/map-adaptive.mjs +1 -2
- package/dist/utils/map-limit.d.mts +0 -2
- package/dist/utils/map-limit.mjs +1 -2
- package/dist/utils/mime.d.mts +0 -2
- package/dist/utils/mime.mjs +1 -2
- package/dist/utils/page-limiter.d.mts +0 -2
- package/dist/utils/page-limiter.mjs +1 -2
- package/dist/utils/path-security.d.mts +0 -2
- package/dist/utils/path-security.mjs +2 -4
- package/dist/utils/path-security.mjs.map +1 -1
- package/dist/utils/public-origin.d.mts +0 -2
- package/dist/utils/public-origin.mjs +1 -2
- package/dist/utils/redact.d.mts +0 -2
- package/dist/utils/redact.mjs +1 -2
- package/dist/utils/remote-environment.d.mts +40 -3
- package/dist/utils/remote-environment.mjs +52 -3
- package/dist/utils/remote-environment.mjs.map +1 -1
- package/dist/utils/resources.d.mts +0 -2
- package/dist/utils/resources.mjs +1 -2
- package/dist/utils/screenshot-store.d.mts +0 -2
- package/dist/utils/screenshot-store.mjs +1 -2
- package/dist/utils/session-gate.d.mts +7 -6
- package/dist/utils/session-gate.mjs +28 -12
- package/dist/utils/session-gate.mjs.map +1 -1
- package/dist/utils/storybook-token.d.mts +11 -3
- package/dist/utils/storybook-token.mjs +10 -9
- package/dist/utils/storybook-token.mjs.map +1 -1
- package/dist/utils/storybook-url.d.mts +0 -2
- package/dist/utils/storybook-url.mjs +1 -2
- package/dist/utils/timing.d.mts +0 -2
- package/dist/utils/timing.mjs +1 -2
- package/dist/utils/ulid.d.mts +0 -2
- package/dist/utils/ulid.mjs +1 -2
- package/dist/utils/zip-read.mjs +1 -2
- package/dist/utils/zip-write.d.mts +0 -2
- package/dist/utils/zip-write.mjs +1 -2
- package/dist/utils.d.mts +5 -5
- package/dist/utils.mjs +5 -5
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/models/content-ref.ts
|
|
5
5
|
/** Content refs for deduplicated Storybook assets. */
|
|
6
6
|
var ContentRefModel = class {
|
|
7
7
|
tables;
|
|
@@ -43,7 +43,6 @@ var ContentRefModel = class {
|
|
|
43
43
|
return (await this.db.list(this.tables.contentRefs)).filter((r) => r.refCount === 0 && r.lastSeenAt < cutoff);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
//#endregion
|
|
47
46
|
export { ContentRefModel };
|
|
48
47
|
|
|
49
48
|
//# sourceMappingURL=content-ref.mjs.map
|
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { SecretKeys } from "../utils/encrypt.mjs";
|
|
5
|
-
//#region src/models/credentials.d.ts
|
|
6
5
|
/** A row no configured key can decrypt. */
|
|
7
6
|
interface UnreadableCredential {
|
|
8
7
|
source: string;
|
|
@@ -31,6 +30,5 @@ declare function probeCredentials(db: DatabaseAdapter, keys: SecretKeys): Promis
|
|
|
31
30
|
* write does not stop the rest.
|
|
32
31
|
*/
|
|
33
32
|
declare function reencryptCredentials(db: DatabaseAdapter, keys: SecretKeys): Promise<ReencryptResult>;
|
|
34
|
-
//#endregion
|
|
35
33
|
export { CredentialProbe, ReencryptResult, UnreadableCredential, probeCredentials, reencryptCredentials };
|
|
36
34
|
//# sourceMappingURL=credentials.d.mts.map
|
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { decryptWithKey, encrypt } from "../utils/encrypt.mjs";
|
|
5
|
-
|
|
5
|
+
// src/models/credentials.ts
|
|
6
6
|
/** Tables that hold encrypted credentials, with the column to read. */
|
|
7
7
|
const SOURCES = [
|
|
8
8
|
{
|
|
@@ -107,7 +107,6 @@ async function reencryptOne(db, keys, item) {
|
|
|
107
107
|
return { state: "failed" };
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
//#endregion
|
|
111
110
|
export { probeCredentials, reencryptCredentials };
|
|
112
111
|
|
|
113
112
|
//# sourceMappingURL=credentials.mjs.map
|
|
@@ -5,7 +5,6 @@ import { SecretInput } from "../utils/encrypt.mjs";
|
|
|
5
5
|
import { DesignCredential } from "../schema/design.mjs";
|
|
6
6
|
import { DesignCredentialStatus } from "./design-resolve.mjs";
|
|
7
7
|
import { Table } from "drizzle-orm";
|
|
8
|
-
//#region src/models/design-credentials.d.ts
|
|
9
8
|
/** Tables required by {@link DesignCredentialModel}. */
|
|
10
9
|
interface DesignCredentialTables {
|
|
11
10
|
designCredentials: Table;
|
|
@@ -36,6 +35,5 @@ declare class DesignCredentialModel {
|
|
|
36
35
|
recordStatus(projectId: string, provider: string, status: DesignCredentialStatus): Promise<void>;
|
|
37
36
|
private replace;
|
|
38
37
|
}
|
|
39
|
-
//#endregion
|
|
40
38
|
export { DesignCredentialModel, DesignCredentialTables, PROJECT_SCOPE };
|
|
41
39
|
//# sourceMappingURL=design-credentials.d.mts.map
|
|
@@ -5,7 +5,7 @@ import { decryptCredential, encrypt } from "../utils/encrypt.mjs";
|
|
|
5
5
|
import { ulid } from "../utils/ulid.mjs";
|
|
6
6
|
import { col } from "./columns.mjs";
|
|
7
7
|
import { and, eq } from "drizzle-orm";
|
|
8
|
-
|
|
8
|
+
// src/models/design-credentials.ts
|
|
9
9
|
/** Encrypted design-provider credentials: the project-wide token an admin pastes. */
|
|
10
10
|
/** Cache scope of the shared project credential (`design_nodes.viewer_id`); a user id marks a member's own connection. */
|
|
11
11
|
const PROJECT_SCOPE = "";
|
|
@@ -80,7 +80,6 @@ var DesignCredentialModel = class {
|
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
//#endregion
|
|
84
83
|
export { DesignCredentialModel, PROJECT_SCOPE };
|
|
85
84
|
|
|
86
85
|
//# sourceMappingURL=design-credentials.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { DesignNode } from "../schema/design.mjs";
|
|
4
|
-
//#region src/models/design-health.d.ts
|
|
5
4
|
/** Cached metadata younger than this is served without a refetch. */
|
|
6
5
|
declare const DESIGN_TTL_MS: number;
|
|
7
6
|
/** True when the design changed after the baseline it is compared with was approved. */
|
|
@@ -11,6 +10,5 @@ declare function isDesignStale(node: Pick<DesignNode, "state" | "lastModified">
|
|
|
11
10
|
* past). `issuedAt` is when the credential was set or replaced — never a status write.
|
|
12
11
|
*/
|
|
13
12
|
declare function credentialDaysLeft(issuedAt: string, maxAgeDays: number, now?: Date): number;
|
|
14
|
-
//#endregion
|
|
15
13
|
export { DESIGN_TTL_MS, credentialDaysLeft, isDesignStale };
|
|
16
14
|
//# sourceMappingURL=design-health.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/models/design-health.ts
|
|
5
5
|
/** Cached metadata younger than this is served without a refetch. */
|
|
6
6
|
const DESIGN_TTL_MS = 9e5;
|
|
7
7
|
/** True when the design changed after the baseline it is compared with was approved. */
|
|
@@ -19,7 +19,6 @@ function credentialDaysLeft(issuedAt, maxAgeDays, now = /* @__PURE__ */ new Date
|
|
|
19
19
|
const ageDays = (now.getTime() - Date.parse(issuedAt)) / 864e5;
|
|
20
20
|
return Math.ceil(maxAgeDays - ageDays);
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
22
|
export { DESIGN_TTL_MS, credentialDaysLeft, isDesignStale };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=design-health.mjs.map
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
3
|
import { Logger } from "../logger.mjs";
|
|
4
|
+
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
5
5
|
import { DesignProvider } from "../adapter/design.mjs";
|
|
6
6
|
import { StorageAdapter } from "../adapter/storage.mjs";
|
|
7
|
-
import { ConnectionModel } from "./connections.mjs";
|
|
8
7
|
import { DesignNode } from "../schema/design.mjs";
|
|
8
|
+
import { ConnectionModel } from "./connections.mjs";
|
|
9
9
|
import { DesignCredentialModel } from "./design-credentials.mjs";
|
|
10
10
|
import { Table } from "drizzle-orm";
|
|
11
11
|
import { Buffer } from "node:buffer";
|
|
12
|
-
//#region src/models/design-nodes.d.ts
|
|
13
12
|
/** Tables required by {@link DesignNodeModel}. */
|
|
14
13
|
interface DesignNodeTables {
|
|
15
14
|
designNodes: Table;
|
|
@@ -78,6 +77,5 @@ declare class DesignNodeModel {
|
|
|
78
77
|
*/
|
|
79
78
|
private store;
|
|
80
79
|
}
|
|
81
|
-
//#endregion
|
|
82
80
|
export { DesignNodeModel, DesignNodeTables, RefreshOptions };
|
|
83
81
|
//# sourceMappingURL=design-nodes.d.mts.map
|
|
@@ -9,7 +9,7 @@ import "./design-credentials.mjs";
|
|
|
9
9
|
import "./design-health.mjs";
|
|
10
10
|
import { DesignRenderStore } from "./design-renders.mjs";
|
|
11
11
|
import { and, eq } from "drizzle-orm";
|
|
12
|
-
|
|
12
|
+
// src/models/design-nodes.ts
|
|
13
13
|
/** Design metadata + render cache: TTL refresh, batched per file, bounded concurrency, abortable. */
|
|
14
14
|
/** Most files refreshed in parallel by one {@link DesignNodeModel.refreshMany} call. */
|
|
15
15
|
const FILE_CONCURRENCY = 3;
|
|
@@ -216,7 +216,6 @@ async function memo(cache, key, load) {
|
|
|
216
216
|
cache.set(key, created);
|
|
217
217
|
return await created;
|
|
218
218
|
}
|
|
219
|
-
//#endregion
|
|
220
219
|
export { DesignNodeModel };
|
|
221
220
|
|
|
222
221
|
//# sourceMappingURL=design-nodes.mjs.map
|
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { designRenderPath } from "../paths.mjs";
|
|
5
|
-
|
|
5
|
+
// src/models/design-renders.ts
|
|
6
6
|
/**
|
|
7
7
|
* Renders live at `{projectId}/design/{provider}/{fileKey}/{node}.png` (a member's own
|
|
8
8
|
* connection: `…/{provider}/user-{id}/{fileKey}/…`), one per
|
|
@@ -68,7 +68,6 @@ var DesignRenderStore = class {
|
|
|
68
68
|
function needsRender(node) {
|
|
69
69
|
return node.state === "ok" && node.nodeId !== "" && node.version !== null && node.renderVersion !== node.version;
|
|
70
70
|
}
|
|
71
|
-
//#endregion
|
|
72
71
|
export { DesignRenderStore };
|
|
73
72
|
|
|
74
73
|
//# sourceMappingURL=design-renders.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { DesignLink } from "../schema/design.mjs";
|
|
4
|
-
//#region src/models/design-resolve.d.ts
|
|
5
4
|
/** Last observed health of a design credential. */
|
|
6
5
|
type DesignCredentialStatus = "unknown" | "ok" | "unauthorized" | "forbidden";
|
|
7
6
|
/** Where a component's resolved design link came from. */
|
|
@@ -24,6 +23,5 @@ declare function resolveDesigns(manual: readonly Pick<DesignLink, "importPath" |
|
|
|
24
23
|
storyImportPath: string | null;
|
|
25
24
|
designUrl?: string | null;
|
|
26
25
|
}[]): Map<string, DesignResolution>;
|
|
27
|
-
//#endregion
|
|
28
26
|
export { DesignCredentialStatus, DesignResolution, DesignSource, normalizeImportPath, resolveDesigns };
|
|
29
27
|
//# sourceMappingURL=design-resolve.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/models/design-resolve.ts
|
|
5
5
|
/** Story-file key: path without a leading `./`, so index and manual entries compare equal. */
|
|
6
6
|
function normalizeImportPath(path) {
|
|
7
7
|
return path.trim().replace(/^(?:\.\/)+/u, "");
|
|
@@ -35,7 +35,6 @@ function storyDesigns(snapshots) {
|
|
|
35
35
|
}
|
|
36
36
|
return resolved;
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { normalizeImportPath, resolveDesigns };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=design-resolve.mjs.map
|
package/dist/models/design.d.mts
CHANGED
|
@@ -4,7 +4,6 @@ import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
|
4
4
|
import { DesignProvider } from "../adapter/design.mjs";
|
|
5
5
|
import { DesignLink } from "../schema/design.mjs";
|
|
6
6
|
import { Table } from "drizzle-orm";
|
|
7
|
-
//#region src/models/design.d.ts
|
|
8
7
|
/** Tables required by {@link DesignModel}. */
|
|
9
8
|
interface DesignTables {
|
|
10
9
|
designLinks: Table;
|
|
@@ -34,6 +33,5 @@ declare class DesignModel {
|
|
|
34
33
|
private links;
|
|
35
34
|
private insertLink;
|
|
36
35
|
}
|
|
37
|
-
//#endregion
|
|
38
36
|
export { DesignModel, DesignTables };
|
|
39
37
|
//# sourceMappingURL=design.d.mts.map
|
package/dist/models/design.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { ulid } from "../utils/ulid.mjs";
|
|
|
6
6
|
import { col } from "./columns.mjs";
|
|
7
7
|
import { normalizeImportPath } from "./design-resolve.mjs";
|
|
8
8
|
import { eq } from "drizzle-orm";
|
|
9
|
-
|
|
9
|
+
// src/models/design.ts
|
|
10
10
|
/** Design-source links: project-level design files and per-component (story file) mappings. */
|
|
11
11
|
/** Data operations for design links; URLs are validated by the configured providers. */
|
|
12
12
|
var DesignModel = class {
|
|
@@ -84,7 +84,6 @@ var DesignModel = class {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
//#endregion
|
|
88
87
|
export { DesignModel };
|
|
89
88
|
|
|
90
89
|
//# sourceMappingURL=design.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { Build } from "../schema/build.mjs";
|
|
4
|
-
//#region src/models/inherited-ratio.d.ts
|
|
5
4
|
/** Builds the average looks at by default (newest first). */
|
|
6
5
|
declare const RECENT_BUILDS_FOR_INHERITED_RATIO = 20;
|
|
7
6
|
/** The average inherited ratio of a project's recent builds. */
|
|
@@ -16,6 +15,5 @@ interface InheritedRatio {
|
|
|
16
15
|
* does (no data is not a 0 % skip rate). A build with no snapshots has no ratio and is skipped.
|
|
17
16
|
*/
|
|
18
17
|
declare function averageInheritedRatio(builds: readonly Pick<Build, "createdAt" | "snapshotCount" | "inheritedCount">[], limit?: number): InheritedRatio | null;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { InheritedRatio, RECENT_BUILDS_FOR_INHERITED_RATIO, averageInheritedRatio };
|
|
21
19
|
//# sourceMappingURL=inherited-ratio.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/models/inherited-ratio.ts
|
|
5
5
|
/** Builds the average looks at by default (newest first). */
|
|
6
6
|
const RECENT_BUILDS_FOR_INHERITED_RATIO = 20;
|
|
7
7
|
/**
|
|
@@ -16,7 +16,6 @@ function averageInheritedRatio(builds, limit = 20) {
|
|
|
16
16
|
builds: recent.length
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { RECENT_BUILDS_FOR_INHERITED_RATIO, averageInheritedRatio };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=inherited-ratio.mjs.map
|
|
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { InsightKind, InsightRow } from "../schema/insight.mjs";
|
|
5
5
|
import { Table } from "drizzle-orm";
|
|
6
|
-
//#region src/models/insight.d.ts
|
|
7
6
|
/** Tables required by {@link InsightModel}. */
|
|
8
7
|
interface InsightTables {
|
|
9
8
|
insights: Table;
|
|
@@ -65,6 +64,5 @@ declare class InsightModel {
|
|
|
65
64
|
private restartIfNeeded;
|
|
66
65
|
private col;
|
|
67
66
|
}
|
|
68
|
-
//#endregion
|
|
69
67
|
export { InsightModel, InsightResultInput, InsightStartInput, InsightStartResult, InsightTables };
|
|
70
68
|
//# sourceMappingURL=insight.d.mts.map
|
package/dist/models/insight.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { ulid } from "../utils/ulid.mjs";
|
|
5
5
|
import { col } from "./columns.mjs";
|
|
6
6
|
import { and, asc, desc, eq, inArray, isNull, lt } from "drizzle-orm";
|
|
7
|
-
|
|
7
|
+
// src/models/insight.ts
|
|
8
8
|
/** Insight rows: pending/running/done/failed runs with dedupe by unique key. */
|
|
9
9
|
/** Data operations for insights. */
|
|
10
10
|
var InsightModel = class {
|
|
@@ -156,7 +156,6 @@ function pick(input) {
|
|
|
156
156
|
promptVersion: input.promptVersion
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
//#endregion
|
|
160
159
|
export { InsightModel };
|
|
161
160
|
|
|
162
161
|
//# sourceMappingURL=insight.mjs.map
|
package/dist/models/label.d.mts
CHANGED
|
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { BuildLabel, LabelType } from "../schema/label.mjs";
|
|
5
5
|
import { Table } from "drizzle-orm";
|
|
6
|
-
//#region src/models/label.d.ts
|
|
7
6
|
/** Tables required by {@link LabelModel}. */
|
|
8
7
|
interface LabelTables {
|
|
9
8
|
builds: Table;
|
|
@@ -55,6 +54,5 @@ declare class LabelModel {
|
|
|
55
54
|
/** Ids of the project's builds marked persistent (exempt from retention). */
|
|
56
55
|
persistentBuildIds(projectId: string): Promise<Set<string>>;
|
|
57
56
|
}
|
|
58
|
-
//#endregion
|
|
59
57
|
export { LabelModel, LabelTables };
|
|
60
58
|
//# sourceMappingURL=label.d.mts.map
|
package/dist/models/label.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { PERSISTENT_LABEL_KEY, RESERVED_LABEL_KEYS, SEEDED_LABEL_KEYS } from "..
|
|
|
5
5
|
import { ulid } from "../utils/ulid.mjs";
|
|
6
6
|
import { col } from "./columns.mjs";
|
|
7
7
|
import { and, desc, eq, inArray } from "drizzle-orm";
|
|
8
|
-
|
|
8
|
+
// src/models/label.ts
|
|
9
9
|
/** Build labels and project label types. */
|
|
10
10
|
/** Data operations for label types and build labels. */
|
|
11
11
|
var LabelModel = class {
|
|
@@ -134,7 +134,6 @@ const SEEDED_LINK_TEMPLATES = {
|
|
|
134
134
|
pr: "https://github.com/{repo}/pull/{value}",
|
|
135
135
|
mr: "https://gitlab.com/{repo}/-/merge_requests/{value}"
|
|
136
136
|
};
|
|
137
|
-
//#endregion
|
|
138
137
|
export { LabelModel };
|
|
139
138
|
|
|
140
139
|
//# sourceMappingURL=label.mjs.map
|
package/dist/models/member.d.mts
CHANGED
|
@@ -4,7 +4,6 @@ import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
|
4
4
|
import { ProjectRole, SiteRole } from "../types.mjs";
|
|
5
5
|
import { ProjectMember } from "../schema/member.mjs";
|
|
6
6
|
import { Table } from "drizzle-orm";
|
|
7
|
-
//#region src/models/member.d.ts
|
|
8
7
|
/** Tables required by {@link MemberModel}. */
|
|
9
8
|
interface MemberTables {
|
|
10
9
|
projectMembers: Table;
|
|
@@ -29,6 +28,5 @@ declare class MemberModel {
|
|
|
29
28
|
/** Resolve a user's effective project role, honoring site-wide admins. */
|
|
30
29
|
effectiveRole(siteRole: SiteRole, projectId: string, userId: string): Promise<ProjectRole | null>;
|
|
31
30
|
}
|
|
32
|
-
//#endregion
|
|
33
31
|
export { MemberModel, MemberTables };
|
|
34
32
|
//# sourceMappingURL=member.d.mts.map
|
package/dist/models/member.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { ulid } from "../utils/ulid.mjs";
|
|
5
5
|
import { col } from "./columns.mjs";
|
|
6
6
|
import { and, eq } from "drizzle-orm";
|
|
7
|
-
|
|
7
|
+
// src/models/member.ts
|
|
8
8
|
/** Project membership and role resolution. */
|
|
9
9
|
/** Data operations for project membership and roles. */
|
|
10
10
|
var MemberModel = class {
|
|
@@ -59,7 +59,6 @@ var MemberModel = class {
|
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
62
|
export { MemberModel };
|
|
64
63
|
|
|
65
64
|
//# sourceMappingURL=member.mjs.map
|
|
@@ -6,7 +6,6 @@ import { NotifierProvider } from "../adapters/notifier/provider.mjs";
|
|
|
6
6
|
import { SecretInput } from "../utils/encrypt.mjs";
|
|
7
7
|
import { NotificationChannelRow } from "../schema/notification.mjs";
|
|
8
8
|
import { Table } from "drizzle-orm";
|
|
9
|
-
//#region src/models/notification-channel.d.ts
|
|
10
9
|
/** Tables required by {@link NotificationChannelModel}. */
|
|
11
10
|
interface NotificationChannelTables {
|
|
12
11
|
notificationChannels: Table;
|
|
@@ -81,6 +80,5 @@ declare class NotificationChannelModel {
|
|
|
81
80
|
/** Decode the JSON-serialized config of a channel. */
|
|
82
81
|
static configOf(row: NotificationChannelRow): Record<string, unknown>;
|
|
83
82
|
}
|
|
84
|
-
//#endregion
|
|
85
83
|
export { ChannelValidation, NotificationChannelCreateInput, NotificationChannelModel, NotificationChannelTables };
|
|
86
84
|
//# sourceMappingURL=notification-channel.d.mts.map
|
|
@@ -6,7 +6,7 @@ import { ulid } from "../utils/ulid.mjs";
|
|
|
6
6
|
import { col } from "./columns.mjs";
|
|
7
7
|
import { isStateProvider } from "../adapters/notifier/provider.mjs";
|
|
8
8
|
import { eq, isNull } from "drizzle-orm";
|
|
9
|
-
|
|
9
|
+
// src/models/notification-channel.ts
|
|
10
10
|
/** Project and site-wide notification channel subscriptions. */
|
|
11
11
|
/** Data operations for notification channels. */
|
|
12
12
|
var NotificationChannelModel = class NotificationChannelModel {
|
|
@@ -166,7 +166,6 @@ function decodeEvents(raw) {
|
|
|
166
166
|
return [];
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
//#endregion
|
|
170
169
|
export { NotificationChannelModel };
|
|
171
170
|
|
|
172
171
|
//# sourceMappingURL=notification-channel.mjs.map
|
|
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { NotificationSubscriptionRow } from "../schema/notification.mjs";
|
|
5
5
|
import { Table } from "drizzle-orm";
|
|
6
|
-
//#region src/models/notification-subscription.d.ts
|
|
7
6
|
/** Tables required by {@link NotificationSubscriptionModel}. */
|
|
8
7
|
interface NotificationSubscriptionTables {
|
|
9
8
|
notificationSubscriptions: Table;
|
|
@@ -38,6 +37,5 @@ declare class NotificationSubscriptionModel {
|
|
|
38
37
|
/** Decode the JSON-serialized channel list of a subscription. */
|
|
39
38
|
static viaOf(row: NotificationSubscriptionRow): string[];
|
|
40
39
|
}
|
|
41
|
-
//#endregion
|
|
42
40
|
export { NotificationSubscriptionInput, NotificationSubscriptionModel, NotificationSubscriptionTables };
|
|
43
41
|
//# sourceMappingURL=notification-subscription.d.mts.map
|
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { ulid } from "../utils/ulid.mjs";
|
|
5
5
|
import { col } from "./columns.mjs";
|
|
6
6
|
import { and, eq } from "drizzle-orm";
|
|
7
|
-
|
|
7
|
+
// src/models/notification-subscription.ts
|
|
8
8
|
/** Per-user opt-in rows for project notifications. */
|
|
9
9
|
/** Data operations for per-user notification subscriptions. */
|
|
10
10
|
var NotificationSubscriptionModel = class {
|
|
@@ -81,7 +81,6 @@ function decodeList(raw) {
|
|
|
81
81
|
return [];
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { NotificationSubscriptionModel };
|
|
86
85
|
|
|
87
86
|
//# sourceMappingURL=notification-subscription.mjs.map
|
|
@@ -4,7 +4,6 @@ import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
|
4
4
|
import { ProjectRole } from "../types.mjs";
|
|
5
5
|
import { ProjectGroupMapping } from "../schema/project-group-mapping.mjs";
|
|
6
6
|
import { Table } from "drizzle-orm";
|
|
7
|
-
//#region src/models/project-group-mapping.d.ts
|
|
8
7
|
/** Tables required by {@link ProjectGroupMappingModel}. */
|
|
9
8
|
interface ProjectGroupMappingTables {
|
|
10
9
|
projectGroupMappings: Table;
|
|
@@ -30,6 +29,5 @@ declare class ProjectGroupMappingModel {
|
|
|
30
29
|
/** Remove a group mapping by id within a project. */
|
|
31
30
|
remove(projectId: string, id: string): Promise<void>;
|
|
32
31
|
}
|
|
33
|
-
//#endregion
|
|
34
32
|
export { ProjectGroupMappingModel, ProjectGroupMappingTables };
|
|
35
33
|
//# sourceMappingURL=project-group-mapping.d.mts.map
|
|
@@ -5,7 +5,7 @@ import { isProjectRole } from "../types.mjs";
|
|
|
5
5
|
import { ulid } from "../utils/ulid.mjs";
|
|
6
6
|
import { col } from "./columns.mjs";
|
|
7
7
|
import { and, eq } from "drizzle-orm";
|
|
8
|
-
|
|
8
|
+
// src/models/project-group-mapping.ts
|
|
9
9
|
/** Project group-to-role mappings for OIDC team sync. */
|
|
10
10
|
/** Data operations for identity-provider group mappings. */
|
|
11
11
|
var ProjectGroupMappingModel = class {
|
|
@@ -50,7 +50,6 @@ var ProjectGroupMappingModel = class {
|
|
|
50
50
|
if (rows[0]) await this.db.remove(this.tables.projectGroupMappings, rows[0].id);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
//#endregion
|
|
54
53
|
export { ProjectGroupMappingModel };
|
|
55
54
|
|
|
56
55
|
//# sourceMappingURL=project-group-mapping.mjs.map
|
|
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { Project } from "../schema/project.mjs";
|
|
5
5
|
import { Table } from "drizzle-orm";
|
|
6
|
-
//#region src/models/project.d.ts
|
|
7
6
|
/** Tables required by {@link ProjectModel}. */
|
|
8
7
|
interface ProjectTables {
|
|
9
8
|
projects: Table;
|
|
@@ -57,6 +56,5 @@ interface ProjectCreateInput {
|
|
|
57
56
|
/** Approvals a build needs with `testing` off (column default 1 when omitted). */
|
|
58
57
|
reviewApprovals?: number;
|
|
59
58
|
}
|
|
60
|
-
//#endregion
|
|
61
59
|
export { ProjectCreateInput, ProjectModel, ProjectTables };
|
|
62
60
|
//# sourceMappingURL=project.d.mts.map
|
package/dist/models/project.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { slugify, ulid } from "../utils/ulid.mjs";
|
|
5
5
|
import { col } from "./columns.mjs";
|
|
6
6
|
import { eq } from "drizzle-orm";
|
|
7
|
-
|
|
7
|
+
// src/models/project.ts
|
|
8
8
|
/** Project records and slug management. */
|
|
9
9
|
/** Data operations for project records. */
|
|
10
10
|
var ProjectModel = class {
|
|
@@ -82,7 +82,6 @@ var ProjectModel = class {
|
|
|
82
82
|
return `${base}-${suffix}`;
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
//#endregion
|
|
86
85
|
export { ProjectModel };
|
|
87
86
|
|
|
88
87
|
//# sourceMappingURL=project.mjs.map
|
|
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { ShelfConfig } from "../config.mjs";
|
|
5
5
|
import { Env } from "../utils/public-origin.mjs";
|
|
6
|
-
//#region src/models/public-origin.d.ts
|
|
7
6
|
/** Key of the stored origin in `site_settings`. */
|
|
8
7
|
declare const PUBLIC_ORIGIN_KEY = "public_origin";
|
|
9
8
|
/** Where the resolved origin came from. */
|
|
@@ -58,6 +57,5 @@ interface PublicOriginOptions {
|
|
|
58
57
|
}
|
|
59
58
|
/** Build the resolver for one app instance. */
|
|
60
59
|
declare function createPublicOriginResolver(options: PublicOriginOptions): PublicOriginResolver;
|
|
61
|
-
//#endregion
|
|
62
60
|
export { PUBLIC_ORIGIN_KEY, PublicOriginOptions, PublicOriginResolver, PublicOriginSource, ResolvedPublicOrigin, StoredPublicOrigin, createPublicOriginResolver };
|
|
63
61
|
//# sourceMappingURL=public-origin.d.mts.map
|
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { detectPublicBaseUrl, normalizeOrigin } from "../utils/public-origin.mjs";
|
|
5
5
|
import { SiteSettingsModel } from "./site-settings.mjs";
|
|
6
|
-
|
|
6
|
+
// src/models/public-origin.ts
|
|
7
7
|
/** Key of the stored origin in `site_settings`. */
|
|
8
8
|
const PUBLIC_ORIGIN_KEY = "public_origin";
|
|
9
9
|
/** Build the resolver for one app instance. */
|
|
@@ -108,7 +108,6 @@ function parseStored(raw) {
|
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
//#endregion
|
|
112
111
|
export { PUBLIC_ORIGIN_KEY, createPublicOriginResolver };
|
|
113
112
|
|
|
114
113
|
//# sourceMappingURL=public-origin.mjs.map
|
|
@@ -2,13 +2,11 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { Build } from "../schema/build.mjs";
|
|
5
|
-
//#region src/models/review-switch-off.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Accept the project's `pending` builds that have no capture attempts and no snapshots; resolves
|
|
8
7
|
* to the builds it accepted. Builds a capture touched keep their status (snapshot approval decides
|
|
9
8
|
* them), and a second run finds nothing left to do. No approval event is raised.
|
|
10
9
|
*/
|
|
11
10
|
declare function acceptPendingWithoutWork(db: DatabaseAdapter, projectId: string): Promise<Build[]>;
|
|
12
|
-
//#endregion
|
|
13
11
|
export { acceptPendingWithoutWork };
|
|
14
12
|
//# sourceMappingURL=review-switch-off.d.mts.map
|
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { CaptureAttemptModel } from "./capture-attempt.mjs";
|
|
5
5
|
import { BuildModel } from "./build.mjs";
|
|
6
6
|
import { SnapshotModel } from "./snapshot.mjs";
|
|
7
|
-
|
|
7
|
+
// src/models/review-switch-off.ts
|
|
8
8
|
/**
|
|
9
9
|
* Accept the project's `pending` builds that have no capture attempts and no snapshots; resolves
|
|
10
10
|
* to the builds it accepted. Builds a capture touched keep their status (snapshot approval decides
|
|
@@ -20,7 +20,6 @@ async function hasWork(db, buildId) {
|
|
|
20
20
|
const [attempts, snapshots] = await Promise.all([new CaptureAttemptModel(db).listByBuild(buildId), new SnapshotModel(db).listByBuild(buildId)]);
|
|
21
21
|
return attempts.length > 0 || snapshots.length > 0;
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { acceptPendingWithoutWork };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=review-switch-off.mjs.map
|
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
4
4
|
import { Table } from "drizzle-orm";
|
|
5
|
-
//#region src/models/site-settings.d.ts
|
|
6
5
|
/** Tables required by {@link SiteSettingsModel}. */
|
|
7
6
|
interface SiteSettingsTables {
|
|
8
7
|
siteSettings: Table;
|
|
@@ -18,6 +17,5 @@ declare class SiteSettingsModel {
|
|
|
18
17
|
/** Delete the setting; a no-op when it is absent. */
|
|
19
18
|
remove(key: string): Promise<void>;
|
|
20
19
|
}
|
|
21
|
-
//#endregion
|
|
22
20
|
export { SiteSettingsModel, SiteSettingsTables };
|
|
23
21
|
//# sourceMappingURL=site-settings.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/models/site-settings.ts
|
|
5
5
|
/** Data operations for `site_settings`, keyed by setting name. */
|
|
6
6
|
var SiteSettingsModel = class {
|
|
7
7
|
#db;
|
|
@@ -42,7 +42,6 @@ var SiteSettingsModel = class {
|
|
|
42
42
|
await this.#db.remove(this.#table, key);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
//#endregion
|
|
46
45
|
export { SiteSettingsModel };
|
|
47
46
|
|
|
48
47
|
//# sourceMappingURL=site-settings.mjs.map
|
|
@@ -4,7 +4,6 @@ import { DatabaseAdapter } from "../adapter/database.mjs";
|
|
|
4
4
|
import { SnapshotStatus } from "../types.mjs";
|
|
5
5
|
import { Snapshot } from "../schema/snapshot.mjs";
|
|
6
6
|
import { Table } from "drizzle-orm";
|
|
7
|
-
//#region src/models/snapshot.d.ts
|
|
8
7
|
/** Tables required by {@link SnapshotModel}. */
|
|
9
8
|
interface SnapshotTables {
|
|
10
9
|
snapshots: Table;
|
|
@@ -77,6 +76,9 @@ interface SnapshotCreateInput {
|
|
|
77
76
|
/** JSON `EnvironmentChange` when accepted as an environment migration. */
|
|
78
77
|
envChange?: string | null;
|
|
79
78
|
inherited?: boolean;
|
|
79
|
+
sourceBuildId?: string | null;
|
|
80
|
+
comparisonImagePath?: string | null;
|
|
81
|
+
comparisonMetadata?: string | null;
|
|
80
82
|
baselineId?: string | null;
|
|
81
83
|
baselineVersion?: string | null;
|
|
82
84
|
/** Resolved mode definition as JSON (display/capture only). */
|
|
@@ -88,6 +90,5 @@ interface SnapshotCreateInput {
|
|
|
88
90
|
/** JSON array of axe violation texts found on this capture; null when none. */
|
|
89
91
|
a11yViolations?: string | null;
|
|
90
92
|
}
|
|
91
|
-
//#endregion
|
|
92
93
|
export { SnapshotCreateInput, SnapshotModel, SnapshotTables };
|
|
93
94
|
//# sourceMappingURL=snapshot.d.mts.map
|