@bridge-ds/core 0.19.0 → 0.21.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.
Files changed (45) hide show
  1. package/LICENSE +17 -0
  2. package/bridge.config.schema.json +5 -0
  3. package/dist/audit/index.js +275 -52
  4. package/dist/audit/index.js.map +1 -1
  5. package/dist/audit/missing-pieces.d.ts +4 -0
  6. package/dist/component-spec.d.ts +13 -0
  7. package/dist/config.d.ts +5 -0
  8. package/dist/exploration-done-github.d.ts +50 -0
  9. package/dist/exploration-resume.d.ts +136 -0
  10. package/dist/explorations-github.d.ts +75 -3
  11. package/dist/explorations.d.ts +137 -8
  12. package/dist/fidelity.d.ts +12 -1
  13. package/dist/figma-fix-loop.d.ts +1 -1
  14. package/dist/figma-fix-run.d.ts +103 -0
  15. package/dist/figma-fixes.d.ts +14 -2
  16. package/dist/gap-case.d.ts +1 -2
  17. package/dist/github-client.d.ts +17 -0
  18. package/dist/index.d.ts +6 -0
  19. package/dist/index.js +2139 -1290
  20. package/dist/index.js.map +1 -1
  21. package/dist/measure-location.d.ts +42 -0
  22. package/dist/measure-workflow.d.ts +48 -0
  23. package/dist/measured-only.d.ts +15 -1
  24. package/dist/node/index.js +15 -12
  25. package/dist/node/index.js.map +1 -1
  26. package/dist/previews-github.d.ts +13 -0
  27. package/dist/previews.d.ts +8 -1
  28. package/dist/{prod-branch-Bdx_2bRQ.js → prod-branch-C7tphFAA.js} +257 -192
  29. package/dist/prod-branch-C7tphFAA.js.map +1 -0
  30. package/dist/prod-branch-github.d.ts +54 -4
  31. package/dist/prod-branch.d.ts +42 -1
  32. package/dist/products.d.ts +17 -0
  33. package/dist/repo-model.d.ts +2 -0
  34. package/dist/{repo-source-m0Tc603o.js → repo-source-CEBBBtm1.js} +2183 -1937
  35. package/dist/repo-source-CEBBBtm1.js.map +1 -0
  36. package/dist/{report-DFPKygfk.js → report-B7wNAnSu.js} +38 -38
  37. package/dist/{report-DFPKygfk.js.map → report-B7wNAnSu.js.map} +1 -1
  38. package/dist/review-gate.d.ts +7 -1
  39. package/dist/suggestion-review.d.ts +43 -2
  40. package/dist/suggestions-github.d.ts +12 -1
  41. package/dist/tier1-publish.d.ts +48 -0
  42. package/dist/try-in-product.d.ts +4 -1
  43. package/package.json +1 -1
  44. package/dist/prod-branch-Bdx_2bRQ.js.map +0 -1
  45. package/dist/repo-source-m0Tc603o.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import type { BridgeConfig } from './config';
2
2
  import type { GitHubClient } from './github-client';
3
+ import type { ProductConfig } from './products';
3
4
  import { type BranchPreview, type PreviewApps } from './previews';
4
5
  export interface BranchPreviewOptions {
5
6
  /** Branch and head commit when the caller knows them (skips reading the pull request). */
@@ -20,3 +21,15 @@ export declare function branchPreviewUrls(gh: GitHubClient, ref: number | string
20
21
  apps?: PreviewApps | undefined;
21
22
  } | undefined;
22
23
  } | undefined, opts?: BranchPreviewOptions): Promise<BranchPreview[]>;
24
+ /**
25
+ * The preview of a branch of a product that has its own repository (products[].repo): the URL Vercel reports in that
26
+ * repository (deployments, commit statuses, its pull request comment), the product's `preview` template only when
27
+ * Vercel cannot have shortened it. Vercel shortens a branch alias over 63 characters with a hash nobody can predict
28
+ * (`bridge-demo-shop-git-explore-wishlis-f9937d-...`), so most exploration branches need the reported URL. Null when
29
+ * the product has no preview. `gh` reads the product repository; a failed read leaves that source out.
30
+ */
31
+ export declare function productPreviewOnGitHub(gh: GitHubClient, product: Pick<ProductConfig, 'key' | 'name' | 'preview'>, e: {
32
+ number: number;
33
+ branch: string;
34
+ sha?: string | undefined;
35
+ }): Promise<BranchPreview | null>;
@@ -114,6 +114,11 @@ export interface BranchPreview {
114
114
  url: string | null;
115
115
  state: PreviewState;
116
116
  source: PreviewUrlSource | null;
117
+ /**
118
+ * Vercel skipped the latest build (its Ignored Build Step: nothing the app is built from changed on the branch), so
119
+ * the branch has no build of its own and its link opens a canceled deployment. Set only when true.
120
+ */
121
+ skipped?: true;
117
122
  }
118
123
  /** A GitHub deployment with its latest status, as `GitHubClient.listDeployments` returns it. */
119
124
  export interface DeploymentLike {
@@ -126,6 +131,8 @@ export interface CommitStatusLike {
126
131
  context: string;
127
132
  state: string;
128
133
  target_url?: string | null | undefined;
134
+ /** "Canceled by Ignored Build Step" when Vercel skipped the build. */
135
+ description?: string | null | undefined;
129
136
  }
130
137
  /** One project of the Vercel bot comment. */
131
138
  export interface VercelCommentProject {
@@ -171,7 +178,7 @@ export interface BranchPreviewSources {
171
178
  * The state comes from the freshest signal: commit status, then deployment, then the comment.
172
179
  */
173
180
  export declare function resolveBranchPreviews(apps: PreviewApps, ctx: PreviewContext, sources?: BranchPreviewSources): BranchPreview[];
174
- /** The previews that have a URL, as links (`{ app, label, url }`), in the stable app order. */
181
+ /** The previews that have a URL, as links (`{ app, label, url }`), in the stable app order. A skipped build has none. */
175
182
  export declare const previewLinksOf: (previews: BranchPreview[]) => {
176
183
  app: keyof PreviewApps;
177
184
  label: string;