@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.
- package/bridge.config.schema.json +5 -0
- package/dist/audit/index.js +3 -3
- package/dist/build-requests.d.ts +10 -1
- package/dist/explorations-github.d.ts +13 -0
- package/dist/explorations.d.ts +22 -1
- package/dist/index.js +148 -129
- package/dist/index.js.map +1 -1
- package/dist/node/index.js +6 -6
- package/dist/{prod-branch-C7tphFAA.js → prod-branch-JL5tmL6u.js} +3 -2
- package/dist/prod-branch-JL5tmL6u.js.map +1 -0
- package/dist/products.d.ts +5 -0
- package/dist/{repo-source-CEBBBtm1.js → repo-source-DmOqTTAZ.js} +135 -125
- package/dist/repo-source-DmOqTTAZ.js.map +1 -0
- package/dist/{report-B7wNAnSu.js → report-CxOwwG_w.js} +2 -2
- package/dist/{report-B7wNAnSu.js.map → report-CxOwwG_w.js.map} +1 -1
- package/package.json +1 -1
- package/dist/prod-branch-C7tphFAA.js.map +0 -1
- package/dist/repo-source-CEBBBtm1.js.map +0 -1
package/dist/products.d.ts
CHANGED
|
@@ -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-
|
|
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
|
-
|
|
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
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
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
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
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
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
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
|
-
|
|
6257
|
-
|
|
6266
|
+
EXPLORATION_LABEL as x,
|
|
6267
|
+
promotionPlan as y,
|
|
6258
6268
|
explorationProblems as z
|
|
6259
6269
|
};
|
|
6260
|
-
//# sourceMappingURL=repo-source-
|
|
6270
|
+
//# sourceMappingURL=repo-source-DmOqTTAZ.js.map
|