@bridge-ds/core 0.21.0 → 0.23.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.
@@ -9,6 +9,11 @@ export interface ProductConfig {
9
9
  path?: string;
10
10
  /** Preview URL pattern, same placeholders as previews.apps: {branch} {rawBranch} {pr} {sha} {sha7}. */
11
11
  preview?: string;
12
+ /**
13
+ * The product in production ("https://shop.acme.com"), no placeholders: Live product in the Bridge toolbar and
14
+ * "See the product today". A product of this repository may use previews.production.<key> instead.
15
+ */
16
+ production?: string;
12
17
  /** react, vue, angular, svelte, astro, other. */
13
18
  framework?: string;
14
19
  /** The product a branch belongs to when nothing else matches: the library. */
@@ -1,4 +1,4 @@
1
- import { cw as tokenBump, a_ as changeKind, L as LayeredTokenSet, aS as aliasOf, c9 as rgbaToDtcg, by as hexToRgba, w as parseTokenFile, q as emptyTokenFile, s as serializeTokenFile, C as moveToken, r as removeToken, bB as inheritedTypeAt, u as upsertToken, H as readTokenAt, b4 as comboKey, c8 as renderedColor, bc as contrastRatio, z as rgbaToHex, U as classifyRisk, bl as figmaPushNextLine, W as RISK_LABELS, bm as figmaPushTierLabel, V as CONFIG_FILE, N as loadConfig, am as ConfigError, af as DEFAULT_TOKEN_PATHS, al as globToRegExp, aj as slugify, Q as validateLayered, bT as parseJson, cd as serializeJson, bZ as plainEqual, cv as toPlain, bv as getEntry, bt as fromPlain, m as modeDisplayName, A as formatValue, _ as previewUrl, M as resolveBranchPreviews, ai as readPreviewComment, O as tokensPath, a4 as NEEDED_BY_LABEL, aZ as canShip, cE as whoCanShipSentence, cy as unreadableShipTeams, cg as soloApprover, aW as approverLists, K as selectTokenFiles, R as parseContrastChecks } from "./prod-branch-C7tphFAA.js";
1
+ import { cw as tokenBump, a_ as changeKind, L as LayeredTokenSet, aS as aliasOf, c9 as rgbaToDtcg, by as hexToRgba, w as parseTokenFile, q as emptyTokenFile, s as serializeTokenFile, C as moveToken, r as removeToken, bB as inheritedTypeAt, u as upsertToken, H as readTokenAt, b4 as comboKey, c8 as renderedColor, bc as contrastRatio, z as rgbaToHex, U as classifyRisk, bl as figmaPushNextLine, W as RISK_LABELS, bm as figmaPushTierLabel, V as CONFIG_FILE, N as loadConfig, am as ConfigError, af as DEFAULT_TOKEN_PATHS, al as globToRegExp, aj as slugify, Q as validateLayered, bT as parseJson, cd as serializeJson, bZ as plainEqual, cv as toPlain, bv as getEntry, bt as fromPlain, m as modeDisplayName, A as formatValue, _ as previewUrl, M as resolveBranchPreviews, ai as readPreviewComment, O as tokensPath, a4 as NEEDED_BY_LABEL, aZ as canShip, cE as whoCanShipSentence, cy as unreadableShipTeams, cg as soloApprover, aW as approverLists, K as selectTokenFiles, R as parseContrastChecks } from "./prod-branch-JL5tmL6u.js";
2
2
  function changesetBump(changes) {
3
3
  return tokenBump(changes) ?? "patch";
4
4
  }
@@ -2662,13 +2662,21 @@ const labelNames = (labels) => labels.map((l) => typeof l === "string" ? l : l.n
2662
2662
  function isExplorationPull(p) {
2663
2663
  return isExplorationBranch(p.headRef) || labelNames(p.labels).includes(EXPLORATION_LABEL) || Boolean(parseExplorationBody(p.body));
2664
2664
  }
2665
+ function isUnlabeledExploration(p) {
2666
+ if (p.state !== "open" || p.draft !== true) return false;
2667
+ const names2 = labelNames(p.labels ?? []);
2668
+ if (names2.includes(EXPLORATION_LABEL) || names2.includes(EXPLORATION_ARCHIVED_LABEL) || names2.includes(EXPLORATION_READY_LABEL)) return false;
2669
+ const block = parseExplorationBody(p.body);
2670
+ if (block?.doneAt) return false;
2671
+ return isExplorationBranch(p.headRef) || Boolean(block);
2672
+ }
2665
2673
  function isHandedOff(p) {
2666
2674
  return labelNames(p.labels).includes(EXPLORATION_READY_LABEL) || Boolean(parseExplorationBody(p.body)?.doneAt);
2667
2675
  }
2668
2676
  function explorationStatus(p) {
2669
2677
  const merged = Boolean(p.merged || p.merged_at || p.state === "merged");
2670
2678
  if (p.state !== "open" && !merged) return "closed";
2671
- if (p.state === "open" && labelNames(p.labels).includes(EXPLORATION_LABEL)) return "active";
2679
+ if (p.state === "open" && (labelNames(p.labels).includes(EXPLORATION_LABEL) || isUnlabeledExploration(p))) return "active";
2672
2680
  if (!isHandedOff(p)) return "promoted";
2673
2681
  if (merged) return "shipped";
2674
2682
  if (p.draft === false) return "building";
@@ -2682,6 +2690,7 @@ function isHeldExploration(p) {
2682
2690
  if (p.state !== void 0 && p.state !== "open") return false;
2683
2691
  const names2 = labelNames(p.labels ?? []);
2684
2692
  if (names2.includes(EXPLORATION_LABEL) || names2.includes(EXPLORATION_ARCHIVED_LABEL)) return true;
2693
+ if (isUnlabeledExploration({ state: "open", draft: p.draft, labels: p.labels, headRef: p.headRef ?? p.head?.ref, body: p.body })) return true;
2685
2694
  return names2.includes(EXPLORATION_READY_LABEL) && p.draft !== false;
2686
2695
  }
2687
2696
  const explorationTakeCommands = (branch) => ["git fetch origin", `git checkout ${branch}`];
@@ -6063,7 +6072,7 @@ export {
6063
6072
  approvedSuggestionOnGitHub as by,
6064
6073
  assertSafeBranch as bz,
6065
6074
  collectHistory as c,
6066
- mergeGate as c$,
6075
+ memorySource as c$,
6067
6076
  declineComment as c0,
6068
6077
  declineReasonProblems as c1,
6069
6078
  declineRequestOnGitHub as c2,
@@ -6088,19 +6097,19 @@ export {
6088
6097
  isPlatformRefusal as cL,
6089
6098
  isReleasePull as cM,
6090
6099
  isTokenRejected as cN,
6091
- jiraIssueFields as cO,
6092
- jiraKeyOf as cP,
6093
- joinRepoPath as cQ,
6094
- linkRequestToExplorationOnGitHub as cR,
6095
- linkSuggestionPrOnGitHub as cS,
6096
- linkedPullsOf as cT,
6097
- loadRepoFiles as cU,
6098
- lookAgainReviewers as cV,
6099
- lowerFirstWord as cW,
6100
- markSuggestionsAppliedOnGitHub as cX,
6101
- markUsedTokens as cY,
6102
- memoryEtagStore as cZ,
6103
- memorySource as c_,
6100
+ isUnlabeledExploration as cO,
6101
+ jiraIssueFields as cP,
6102
+ jiraKeyOf as cQ,
6103
+ joinRepoPath as cR,
6104
+ linkRequestToExplorationOnGitHub as cS,
6105
+ linkSuggestionPrOnGitHub as cT,
6106
+ linkedPullsOf as cU,
6107
+ loadRepoFiles as cV,
6108
+ lookAgainReviewers as cW,
6109
+ lowerFirstWord as cX,
6110
+ markSuggestionsAppliedOnGitHub as cY,
6111
+ markUsedTokens as cZ,
6112
+ memoryEtagStore as c_,
6104
6113
  docsSuggestionPayload as ca,
6105
6114
  docsText as cb,
6106
6115
  draftChangeLine as cc,
@@ -6128,113 +6137,114 @@ export {
6128
6137
  hasSuggestionBlock as cy,
6129
6138
  hasWriteAccess as cz,
6130
6139
  applyTokenEdits as d,
6131
- storybookManagerUrl as d$,
6132
- missingPermissionMessage as d0,
6133
- missingProse as d1,
6134
- modeLabel as d2,
6135
- needsDocsReview as d3,
6136
- normalizeStorybookUrl as d4,
6137
- openPulls as d5,
6138
- overrideHolders as d6,
6139
- overrideReasonMin as d7,
6140
- overrideReasonProblem as d8,
6141
- overrideSuggestionOnGitHub as d9,
6142
- propsTable as dA,
6143
- pushChangeRows as dB,
6144
- rateLimitMessage as dC,
6145
- releasePull as dD,
6146
- reopenEligibility as dE,
6147
- requestBrief as dF,
6148
- requestImagePath as dG,
6149
- requesterFirstName as dH,
6150
- requesterLine as dI,
6151
- requesterOf as dJ,
6152
- requiredApprovals as dK,
6153
- requiredPermission as dL,
6154
- reviewQueue as dM,
6155
- reviewStatusKind as dN,
6156
- reviewStatusLabel as dO,
6157
- reviewSuggestionOnGitHub as dP,
6158
- reviewersToAsk as dQ,
6159
- sectionsNeedingReview as dR,
6160
- sha256Hex as dS,
6161
- sharedTokenPrefix as dT,
6162
- shortVariant as dU,
6163
- shortVariants as dV,
6164
- specHash as dW,
6165
- specsUsage as dX,
6166
- stalenessStatus as dY,
6167
- storybookIframeUrl as dZ,
6168
- storybookIndexUrls as d_,
6169
- ownerOverridePolicy as da,
6170
- parseBoxShadow as db,
6171
- parseChangesetText as dc,
6172
- parseExplorationRef as dd,
6173
- parseJiraKey as de,
6174
- parseMeasuredSpecsFile as df,
6175
- parseOverrideComment as dg,
6176
- parseRepo as dh,
6177
- parseStorybookIndex as di,
6178
- parseStructureChange as dj,
6179
- parseSuggestionAppliedComment as dk,
6180
- parseSuggestionIssue as dl,
6181
- parseSuggestionOverrideComment as dm,
6182
- parseSuggestionReviewComment as dn,
6183
- parseTier as dp,
6184
- patchDocsJson as dq,
6185
- pendingApprovals as dr,
6186
- permissionLabel as ds,
6187
- planRestore as dt,
6188
- planRevert as du,
6189
- planSuggestionApply as dv,
6190
- planToJson as dw,
6191
- prNumberFromSubject as dx,
6192
- prefillDocs as dy,
6193
- proposeDocsOnGitHub as dz,
6140
+ storybookIndexUrls as d$,
6141
+ mergeGate as d0,
6142
+ missingPermissionMessage as d1,
6143
+ missingProse as d2,
6144
+ modeLabel as d3,
6145
+ needsDocsReview as d4,
6146
+ normalizeStorybookUrl as d5,
6147
+ openPulls as d6,
6148
+ overrideHolders as d7,
6149
+ overrideReasonMin as d8,
6150
+ overrideReasonProblem as d9,
6151
+ proposeDocsOnGitHub as dA,
6152
+ propsTable as dB,
6153
+ pushChangeRows as dC,
6154
+ rateLimitMessage as dD,
6155
+ releasePull as dE,
6156
+ reopenEligibility as dF,
6157
+ requestBrief as dG,
6158
+ requestImagePath as dH,
6159
+ requesterFirstName as dI,
6160
+ requesterLine as dJ,
6161
+ requesterOf as dK,
6162
+ requiredApprovals as dL,
6163
+ requiredPermission as dM,
6164
+ reviewQueue as dN,
6165
+ reviewStatusKind as dO,
6166
+ reviewStatusLabel as dP,
6167
+ reviewSuggestionOnGitHub as dQ,
6168
+ reviewersToAsk as dR,
6169
+ sectionsNeedingReview as dS,
6170
+ sha256Hex as dT,
6171
+ sharedTokenPrefix as dU,
6172
+ shortVariant as dV,
6173
+ shortVariants as dW,
6174
+ specHash as dX,
6175
+ specsUsage as dY,
6176
+ stalenessStatus as dZ,
6177
+ storybookIframeUrl as d_,
6178
+ overrideSuggestionOnGitHub as da,
6179
+ ownerOverridePolicy as db,
6180
+ parseBoxShadow as dc,
6181
+ parseChangesetText as dd,
6182
+ parseExplorationRef as de,
6183
+ parseJiraKey as df,
6184
+ parseMeasuredSpecsFile as dg,
6185
+ parseOverrideComment as dh,
6186
+ parseRepo as di,
6187
+ parseStorybookIndex as dj,
6188
+ parseStructureChange as dk,
6189
+ parseSuggestionAppliedComment as dl,
6190
+ parseSuggestionIssue as dm,
6191
+ parseSuggestionOverrideComment as dn,
6192
+ parseSuggestionReviewComment as dp,
6193
+ parseTier as dq,
6194
+ patchDocsJson as dr,
6195
+ pendingApprovals as ds,
6196
+ permissionLabel as dt,
6197
+ planRestore as du,
6198
+ planRevert as dv,
6199
+ planSuggestionApply as dw,
6200
+ planToJson as dx,
6201
+ prNumberFromSubject as dy,
6202
+ prefillDocs as dz,
6194
6203
  buildHistoryEntry as e,
6195
- subjectTitle as e0,
6196
- suggestionAllowedRoots as e1,
6197
- suggestionAppliedComment as e2,
6198
- suggestionApplyTable as e3,
6199
- suggestionIsTokenValues as e4,
6200
- suggestionIssueTitle as e5,
6201
- suggestionKindFromLabels as e6,
6202
- suggestionLabelChanges as e7,
6203
- suggestionLabels as e8,
6204
- suggestionOverrideOf as e9,
6205
- withFigmaPushApprovals as eA,
6206
- withOutdated as eB,
6207
- withRequestExploration as eC,
6208
- withSrgbColors as eD,
6209
- withSuggestionApprovals as eE,
6210
- withTokenValueApprovals as eF,
6211
- withoutJiraKey as eG,
6212
- suggestionOverrideProblem as ea,
6213
- suggestionPathProblems as eb,
6214
- suggestionPayloadSha as ec,
6215
- suggestionReviewState as ed,
6216
- suggestionShapeProblems as ee,
6217
- suggestionStalenessOnGitHub as ef,
6218
- suggestionStateLabel as eg,
6219
- suggestionSubject as eh,
6220
- suggestionTouches as ei,
6221
- summarizeSuggestionApprovals as ej,
6222
- syncSuggestionStateLabel as ek,
6223
- titleOf as el,
6224
- toChangeSummary as em,
6225
- tokenCssVar as en,
6226
- tokenFingerprint as eo,
6227
- tokenHistory as ep,
6228
- tokenVariablePath as eq,
6229
- unsafePathProblem as er,
6230
- utf8ToBase64 as es,
6231
- validateComponentSpec as et,
6232
- validateDocs as eu,
6233
- validateIntegrations as ev,
6234
- variantName as ew,
6235
- versionTimeline as ex,
6236
- webStorageEtagStore as ey,
6237
- withAuthorLine as ez,
6204
+ storybookManagerUrl as e0,
6205
+ subjectTitle as e1,
6206
+ suggestionAllowedRoots as e2,
6207
+ suggestionAppliedComment as e3,
6208
+ suggestionApplyTable as e4,
6209
+ suggestionIsTokenValues as e5,
6210
+ suggestionIssueTitle as e6,
6211
+ suggestionKindFromLabels as e7,
6212
+ suggestionLabelChanges as e8,
6213
+ suggestionLabels as e9,
6214
+ withAuthorLine as eA,
6215
+ withFigmaPushApprovals as eB,
6216
+ withOutdated as eC,
6217
+ withRequestExploration as eD,
6218
+ withSrgbColors as eE,
6219
+ withSuggestionApprovals as eF,
6220
+ withTokenValueApprovals as eG,
6221
+ withoutJiraKey as eH,
6222
+ suggestionOverrideOf as ea,
6223
+ suggestionOverrideProblem as eb,
6224
+ suggestionPathProblems as ec,
6225
+ suggestionPayloadSha as ed,
6226
+ suggestionReviewState as ee,
6227
+ suggestionShapeProblems as ef,
6228
+ suggestionStalenessOnGitHub as eg,
6229
+ suggestionStateLabel as eh,
6230
+ suggestionSubject as ei,
6231
+ suggestionTouches as ej,
6232
+ summarizeSuggestionApprovals as ek,
6233
+ syncSuggestionStateLabel as el,
6234
+ titleOf as em,
6235
+ toChangeSummary as en,
6236
+ tokenCssVar as eo,
6237
+ tokenFingerprint as ep,
6238
+ tokenHistory as eq,
6239
+ tokenVariablePath as er,
6240
+ unsafePathProblem as es,
6241
+ utf8ToBase64 as et,
6242
+ validateComponentSpec as eu,
6243
+ validateDocs as ev,
6244
+ validateIntegrations as ew,
6245
+ variantName as ex,
6246
+ versionTimeline as ey,
6247
+ webStorageEtagStore as ez,
6238
6248
  coerceValue as f,
6239
6249
  checkLayeredPair as g,
6240
6250
  formatChangeset as h,
@@ -6253,8 +6263,8 @@ export {
6253
6263
  explorationStatus as u,
6254
6264
  explorationTryIt as v,
6255
6265
  isExplorationPull as w,
6256
- promotionPlan as x,
6257
- EXPLORATION_LABEL as y,
6266
+ EXPLORATION_LABEL as x,
6267
+ promotionPlan as y,
6258
6268
  explorationProblems as z
6259
6269
  };
6260
- //# sourceMappingURL=repo-source-CEBBBtm1.js.map
6270
+ //# sourceMappingURL=repo-source-DmOqTTAZ.js.map