@bridge-ds/cli 0.11.1 → 0.11.2
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.js +41 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -4050,6 +4050,33 @@ var EXPLORATION_USE_CASES = [
|
|
|
4050
4050
|
];
|
|
4051
4051
|
var EXPLORATION_STATUS_LABEL = { active: "Running", promoted: "Promoted to review", closed: "Closed" };
|
|
4052
4052
|
|
|
4053
|
+
// ../core/src/titles.ts
|
|
4054
|
+
var escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4055
|
+
function properWord(word, names) {
|
|
4056
|
+
const bare = word.replace(/[^\p{L}\p{N}]+$/u, "");
|
|
4057
|
+
if (!bare) return false;
|
|
4058
|
+
if (names.some((n) => n === bare)) return true;
|
|
4059
|
+
return new RegExp("\\p{Lu}", "u").test(bare.slice(1));
|
|
4060
|
+
}
|
|
4061
|
+
function lowerFirstWord(text, names = []) {
|
|
4062
|
+
const first = text.split(/\s+/)[0] ?? "";
|
|
4063
|
+
if (!first || properWord(first, names)) return text;
|
|
4064
|
+
return `${text.charAt(0).toLowerCase()}${text.slice(1)}`;
|
|
4065
|
+
}
|
|
4066
|
+
function subjectTitle(subject, title, names = []) {
|
|
4067
|
+
const t = title.trim().replace(/\.$/, "");
|
|
4068
|
+
const keep = [subject, ...names];
|
|
4069
|
+
const s = subject.trim();
|
|
4070
|
+
if (!s) return t;
|
|
4071
|
+
const m = new RegExp(`^${escape(s)}(?=$|[^\\p{L}\\p{N}])\\s*(:)?\\s*`, "iu").exec(t);
|
|
4072
|
+
if (m) {
|
|
4073
|
+
const rest = t.slice(m[0].length);
|
|
4074
|
+
if (!rest) return s;
|
|
4075
|
+
return m[1] ? `${s}: ${lowerFirstWord(rest, keep)}` : `${s} ${rest}`;
|
|
4076
|
+
}
|
|
4077
|
+
return `${s}: ${lowerFirstWord(t, keep)}`;
|
|
4078
|
+
}
|
|
4079
|
+
|
|
4053
4080
|
// ../core/src/requests.ts
|
|
4054
4081
|
var REQUEST_KINDS = [
|
|
4055
4082
|
{ value: "new-component", label: "New component", hint: "A component the design system does not have yet." },
|
|
@@ -4063,8 +4090,7 @@ var REQUEST_KINDS = [
|
|
|
4063
4090
|
];
|
|
4064
4091
|
var REQUEST_LABEL = "component-change";
|
|
4065
4092
|
function requestIssueTitle(r) {
|
|
4066
|
-
|
|
4067
|
-
return `${r.component}: ${t.charAt(0).toLowerCase()}${t.slice(1)}`;
|
|
4093
|
+
return subjectTitle(r.component, r.title);
|
|
4068
4094
|
}
|
|
4069
4095
|
var REQUEST_STATUS_LABEL = { requested: "Requested", "in-progress": "In progress", done: "Done", declined: "Declined" };
|
|
4070
4096
|
function validateIntegrations(i) {
|
|
@@ -4096,6 +4122,16 @@ function jiraIssueFields(r, jira, issueUrl) {
|
|
|
4096
4122
|
}
|
|
4097
4123
|
|
|
4098
4124
|
// ../core/src/suggestions.ts
|
|
4125
|
+
var SUGGESTION_STATE_LABELS = {
|
|
4126
|
+
"needs-review": "suggestion: needs review",
|
|
4127
|
+
"changes-requested": "suggestion: changes requested",
|
|
4128
|
+
approved: "suggestion: approved",
|
|
4129
|
+
applying: "suggestion: applying"
|
|
4130
|
+
};
|
|
4131
|
+
var SUGGESTION_FINAL_LABELS = {
|
|
4132
|
+
applied: "suggestion: applied",
|
|
4133
|
+
declined: "suggestion: declined"
|
|
4134
|
+
};
|
|
4099
4135
|
var SUGGESTION_STATUS_LABEL = {
|
|
4100
4136
|
"needs-review": "Needs review",
|
|
4101
4137
|
"changes-requested": "Changes requested",
|
|
@@ -4105,6 +4141,7 @@ var SUGGESTION_STATUS_LABEL = {
|
|
|
4105
4141
|
declined: "Declined",
|
|
4106
4142
|
outdated: "Outdated"
|
|
4107
4143
|
};
|
|
4144
|
+
var SUGGESTION_STATUS_LABELS = [...Object.values(SUGGESTION_STATE_LABELS), ...Object.values(SUGGESTION_FINAL_LABELS)];
|
|
4108
4145
|
|
|
4109
4146
|
// ../core/src/suggestion-apply.ts
|
|
4110
4147
|
var SUGGESTION_APPLY_EXIT = {
|
|
@@ -7203,6 +7240,7 @@ async function runBranch(a, root, io = defaultIO()) {
|
|
|
7203
7240
|
io.print(`#${r.pr} ${r.title} (${r.product.name})`);
|
|
7204
7241
|
io.print(`${r.status.label}. ${r.approvalNeeded} needed; approved by ${r.approvals.approvedBy.map((x) => `@${x}`).join(", ") || "nobody yet"}.`);
|
|
7205
7242
|
if (r.approvals.soloOwner) io.print(r.approvals.soloOwner);
|
|
7243
|
+
io.print(`${r.tests.label}.`);
|
|
7206
7244
|
if (r.merge.blockedBy?.length) for (const x of r.merge.blockedBy) io.print(` ${x}`);
|
|
7207
7245
|
io.print(`Next: ${r.next}`);
|
|
7208
7246
|
io.print(r.url);
|
|
@@ -7651,7 +7689,7 @@ async function rolesReport(opts) {
|
|
|
7651
7689
|
|
|
7652
7690
|
// src/index.ts
|
|
7653
7691
|
import { brand, BridgeContext as BridgeContext8, CONFIG_FILE as CONFIG_FILE2, core, detectConfig, GitRefSource, history as hist, LocalSource, ops, optionsFromArgv, serveStdio, toConfigJson } from "@bridge-ds/mcp";
|
|
7654
|
-
var VERSION = true ? "0.11.
|
|
7692
|
+
var VERSION = true ? "0.11.2" : "dev";
|
|
7655
7693
|
var MCP_PACKAGE = "@bridge-ds/mcp";
|
|
7656
7694
|
var HELP = `bridge ${VERSION}: design system as code, for you and your Claude
|
|
7657
7695
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bridge-ds/cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "bridge CLI: set up Bridge in a design system repo, check tokens in CI, search and diff tokens, propose changes, start the MCP server.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"build:package": "node ../../scripts/build-packages.mjs cli"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@bridge-ds/mcp": "^0.8.
|
|
47
|
-
"@bridge-ds/visual": "^0.3.
|
|
46
|
+
"@bridge-ds/mcp": "^0.8.4",
|
|
47
|
+
"@bridge-ds/visual": "^0.3.11",
|
|
48
48
|
"typescript": "5.9.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|