@theholocron/cli 5.0.0-alpha.501 → 5.0.0-alpha.503

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.
@@ -80,6 +80,44 @@ function validateEnvironmentChoice(entry, what, required = true) {
80
80
  }
81
81
  if (required) throw new ConfigError$1(`${what} needs the name of a vault environment (\`environment\`) or a \`layer\``);
82
82
  }
83
+ // src/config/validate-repo-labels/validate-repo-labels.ts
84
+ /** What an area name may be: the rest of `area:<name>`, so no colon, comma, space or leading symbol. */
85
+ const AREA_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
86
+ /** GitHub's longest label name is 50 characters, and `area:` takes five. */
87
+ const MAX_NAME = 45;
88
+ /**
89
+ * Check `repo.labels` (spec `tech-github-area-labels`): each area name must be usable as the suffix of a label (letters,
90
+ * digits, `.`, `_` and `-`, at most 45 characters) and appear once whatever the case (GitHub's labels are
91
+ * case-insensitive), each area needs a list of patterns with at least one that includes a path, and each scope names a
92
+ * declared area.
93
+ *
94
+ * @param labels - `repo.labels`, if the config has it.
95
+ * @throws {ConfigError} Naming the path of the first problem found.
96
+ */
97
+ function validateRepoLabels(labels) {
98
+ if (labels === void 0) return;
99
+ const areas = labels.areas ?? {};
100
+ const seen = /* @__PURE__ */ new Map();
101
+ for (const [name, patterns] of Object.entries(areas)) {
102
+ const at = `\`repo.labels.areas.${name}\``;
103
+ if (!AREA_NAME.test(name) || name.length > MAX_NAME) throw new ConfigError$1(`${at}: ${JSON.stringify(name)} cannot be the name of an \`area:<name>\` label (use letters, digits, ".", "_" or "-", at most ${MAX_NAME} characters)`);
104
+ const lower = name.toLowerCase();
105
+ const first = seen.get(lower);
106
+ if (first !== void 0) throw new ConfigError$1(`${at}: duplicates \`repo.labels.areas.${first}\` (label names ignore case)`);
107
+ seen.set(lower, name);
108
+ if (!Array.isArray(patterns) || patterns.length === 0) throw new ConfigError$1(`${at} needs a list of folder patterns, got none`);
109
+ for (const pattern of patterns) if (typeof pattern !== "string" || pattern.replace(/^!/, "").trim() === "") throw new ConfigError$1(`${at} has an empty pattern`);
110
+ if (patterns.every((p) => p.startsWith("!"))) throw new ConfigError$1(`${at} has only exclusions ("!..."), so no path could be in it`);
111
+ }
112
+ for (const [scope, area] of Object.entries(labels.scopes ?? {})) {
113
+ const at = `\`repo.labels.scopes.${scope}\``;
114
+ if (scope.trim() === "") throw new ConfigError$1("`repo.labels.scopes` has an empty scope name");
115
+ if (typeof area !== "string" || !Object.hasOwn(areas, area)) {
116
+ const known = Object.keys(areas);
117
+ throw new ConfigError$1(`${at} names the unknown area ${JSON.stringify(area)}; ${known.length > 0 ? `the declared areas are ${known.join(", ")}` : "`repo.labels.areas` declares none"}`);
118
+ }
119
+ }
120
+ }
83
121
  // src/credentials-environments/repo-slug/repo-slug.ts
84
122
  /**
85
123
  * The `<org>/<repo>` of the repository at `cwd`, from its `origin` remote. A remote that is missing or cannot be
@@ -346,6 +384,7 @@ function resolveConfig(raw) {
346
384
  if (raw.dev !== void 0) validateDev(raw.dev);
347
385
  if (raw.githubApps !== void 0) validateGitHubApps(raw.githubApps);
348
386
  if (raw.ideas !== void 0) validateIdeas(raw.ideas);
387
+ validateRepoLabels(raw.repo?.labels);
349
388
  validateVariablesSync(raw.repo?.variables);
350
389
  validateSecretsDeploy(raw.repo?.secrets);
351
390
  validateSecretsSync(raw.repo?.secrets);
@@ -287,6 +287,21 @@ interface OrgConfig {
287
287
  org?: string;
288
288
  };
289
289
  }
290
+ /**
291
+ * The label map of the `repo` block (spec `tech-github-area-labels`, #2430). Names only, checked when the config loads
292
+ * (`validateRepoLabels()`). `holocron setup` makes the `area:<name>` labels, `doctor repo` checks them, `--area` on
293
+ * `new issue` and `update issue` takes the names, and `areaLabelsForFiles()` / `areaLabelsForTitle()` (exported from
294
+ * `@theholocron/cli`) are the one mapping Sentinel and the backfill probe use.
295
+ */
296
+ interface RepoLabels {
297
+ /**
298
+ * Area name to the folder patterns it covers; the label is `area:<name>`. A pattern is a glob (`cli/**`), a file or a
299
+ * folder; one starting with `!` takes a path out of the area. At least one pattern must include a path.
300
+ */
301
+ areas?: Record<string, string[]>;
302
+ /** A title scope (`feat(sentinel)`) to the area it means; every value must be a declared area. */
303
+ scopes?: Record<string, string>;
304
+ }
290
305
  /** The `repo` block: how the GitHub repository is set up and kept in sync by `holocron setup`. */
291
306
  interface RepoConfig {
292
307
  /** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
@@ -328,6 +343,8 @@ interface RepoConfig {
328
343
  variables?: RepoVariables;
329
344
  /** The secrets that must exist, checked by `holocron doctor secrets`. Names only; nothing writes them. */
330
345
  secrets?: RepoSecrets;
346
+ /** The area labels of this repository, from folders and title scopes. */
347
+ labels?: RepoLabels;
331
348
  }
332
349
  /** An application in the repo. */
333
350
  interface AppConfig {
@@ -1348,6 +1365,13 @@ interface Source extends ProviderIdentity {
1348
1365
  * Optional — providers that have no label concept omit this.
1349
1366
  */
1350
1367
  syncLabels?(canonical: ReadonlyArray<LabelDef>, stale: ReadonlyArray<string>): Promise<string>;
1368
+ /**
1369
+ * Make the labels that are missing and leave every existing one exactly as it is (name case aside): no colour or
1370
+ * description is patched and nothing is deleted. For per-repo label families such as `area:<name>`, which are not
1371
+ * in the canonical set `syncLabels` owns.
1372
+ * Optional — providers that have no label concept omit this.
1373
+ */
1374
+ ensureLabels?(labels: ReadonlyArray<LabelDef>): Promise<string>;
1351
1375
  /**
1352
1376
  * Set org-level custom property values on the repo. `string[]` for
1353
1377
  * `multi_select` properties, plain `string` for everything else.
@@ -1505,6 +1529,12 @@ interface Source extends ProviderIdentity {
1505
1529
  * Optional — providers without a PR concept omit this.
1506
1530
  */
1507
1531
  listPullRequestCommits?(number: number, repo?: string): Promise<string[]>;
1532
+ /**
1533
+ * The paths one pull request changes, as the repository spells them (a renamed file lists both its new and its old
1534
+ * path), each once. A provider that caps the list returns what it has. `update work` reads the changed folders from
1535
+ * it for the area labels. Optional — providers without a PR concept omit this.
1536
+ */
1537
+ listPullRequestFiles?(number: number, repo?: string): Promise<string[]>;
1508
1538
  /**
1509
1539
  * Every branch on the remote, with the commit each points at.
1510
1540
  * Optional — providers without branches omit this.
@@ -1515,6 +1545,31 @@ interface Source extends ProviderIdentity {
1515
1545
  * Optional — providers that cannot delete a branch omit this.
1516
1546
  */
1517
1547
  deleteBranch?(name: string, repo?: string): Promise<void>;
1548
+ /**
1549
+ * Opens a pull request, a draft by default, and links it to an issue with a `Closes` or `Refs` line in the body.
1550
+ * Idempotent: an open pull request for the same head is returned (`created: false`), never a second one. Labels,
1551
+ * assignees, milestone and projects are applied after it is made, and what the provider cannot apply comes back in
1552
+ * `dropped`. Optional — providers without pull requests omit this.
1553
+ */
1554
+ createPullRequest?(input: PullRequestInput, repo?: string): Promise<PullRequestResult>;
1555
+ /**
1556
+ * Changes a pull request: a field not in the patch is left alone and nothing is cleared unless the patch says so.
1557
+ * Optional — providers without pull requests omit this.
1558
+ */
1559
+ updatePullRequest?(number: number, patch: PullRequestPatch, repo?: string): Promise<PullRequestResult>;
1560
+ /**
1561
+ * Takes a draft pull request out of draft. Idempotent: one that is not a draft (or is closed or merged) is
1562
+ * left as it is and reported as `false`. Optional — providers without drafts omit this.
1563
+ *
1564
+ * @returns `true` when the pull request was a draft and now is not.
1565
+ */
1566
+ markReady?(number: number, repo?: string): Promise<boolean>;
1567
+ /**
1568
+ * The verdict of the aggregate check (`ci / Required checks`) on a pull request's newest commit, read each time it
1569
+ * is asked, with the checks that failed. `close work` reads it before it marks a pull request ready. Optional —
1570
+ * providers without checks omit this.
1571
+ */
1572
+ getPullRequestChecks?(number: number, repo?: string): Promise<PullRequestChecks>;
1518
1573
  /**
1519
1574
  * Enable or update GitHub Pages for the repository.
1520
1575
  * Idempotent: POST to create, PUT to update existing settings.
@@ -1544,6 +1599,75 @@ interface SourceBranch {
1544
1599
  /** The commit the branch points at. */
1545
1600
  sha: string;
1546
1601
  }
1602
+ /** What {@link Source.createPullRequest} takes. */
1603
+ interface PullRequestInput extends PullRequestFields {
1604
+ /** The pull request's title; a Conventional Commit line, since the squashed title is what a release reads. */
1605
+ title: string;
1606
+ /** The branch with the changes. */
1607
+ head: string;
1608
+ /** The branch to merge into. */
1609
+ base: string;
1610
+ /** Open it as a draft. Default `true`. */
1611
+ draft?: boolean;
1612
+ /** The issue the pull request is for; a `Closes` or `Refs` line is added to the body unless the body already names it. */
1613
+ link?: PullRequestLink;
1614
+ }
1615
+ /** A pull request's link to the issue it is for. */
1616
+ interface PullRequestLink {
1617
+ /** The issue, as the tracker spells it: `#12`, `12`, `owner/repo#12` or `ENG-42`. */
1618
+ issue: string;
1619
+ /** `Closes` closes the issue on merge; `Refs` only mentions it. Default `Refs`. */
1620
+ keyword?: "Closes" | "Refs";
1621
+ }
1622
+ /** What {@link Source.updatePullRequest} takes; every field is optional. */
1623
+ interface PullRequestPatch extends PullRequestFields {
1624
+ /** A new title. */
1625
+ title?: string;
1626
+ /** A new base branch. */
1627
+ base?: string;
1628
+ /** Open or close it. */
1629
+ state?: "open" | "closed";
1630
+ /** Labels to take off; those in `labels` are added. */
1631
+ removeLabels?: string[];
1632
+ }
1633
+ /** The fields a pull request mirrors from its issue, shared by {@link PullRequestInput} and {@link PullRequestPatch}. */
1634
+ interface PullRequestFields {
1635
+ /** The description (markdown). */
1636
+ body?: string;
1637
+ /** Labels to add; existing ones are kept. */
1638
+ labels?: string[];
1639
+ /** Assignee logins to add; existing ones are kept. */
1640
+ assignees?: string[];
1641
+ /** The milestone's title; a title that does not exist is dropped, never created. */
1642
+ milestone?: string;
1643
+ /** Titles of the boards to put the pull request on; one already there or not found is left or dropped. */
1644
+ projects?: string[];
1645
+ }
1646
+ /** What {@link Source.createPullRequest} and {@link Source.updatePullRequest} return. */
1647
+ interface PullRequestResult {
1648
+ /** The pull request as it now stands. */
1649
+ pullRequest: PullRequest;
1650
+ /** Whether this call made it; `false` when an open one for the same head was reused. Always `false` for an update. */
1651
+ created: boolean;
1652
+ /** Whether it is a draft. */
1653
+ draft: boolean;
1654
+ /** What the provider could not apply (a milestone or board it does not have, a label it refused), by name. */
1655
+ dropped: string[];
1656
+ }
1657
+ /** Where the aggregate check of a pull request stands. */
1658
+ type PullRequestChecksState = "success" | "failure" | "pending" | "none";
1659
+ /** What {@link Source.getPullRequestChecks} returns. */
1660
+ interface PullRequestChecks {
1661
+ /** The aggregate's verdict: `pending` while it runs (a cancelled run counts), `none` when it has not been posted. */
1662
+ state: PullRequestChecksState;
1663
+ /** The commit the verdict is for. */
1664
+ sha?: string;
1665
+ /** The checks that failed on that commit, newest run of each name; empty unless something failed. */
1666
+ failing: Array<{
1667
+ name: string;
1668
+ url?: string;
1669
+ }>;
1670
+ }
1547
1671
  /** A pull request as {@link Source.getPullRequest} and {@link Source.listPullRequests} report it. */
1548
1672
  interface PullRequest {
1549
1673
  /** The pull request's number within the repository. */
@@ -1760,6 +1884,77 @@ interface TrackerDoctorReport {
1760
1884
  }
1761
1885
  /** How urgent an issue is, in words no tracker owns. Linear has all five natively; GitHub holds it in a project field. */
1762
1886
  type IssuePriority = "none" | "urgent" | "high" | "medium" | "low";
1887
+ /** How much work an issue is, in words no tracker owns. GitHub holds it in the `Effort` issue field, Linear as an estimate. */
1888
+ type IssueEffort = "high" | "medium" | "low";
1889
+ /** What kind of issue it is. GitHub holds it as the issue Type (Bug, Feature, Task); Linear has no Type, so the kind is a label. */
1890
+ type IssueKind = "bug" | "feature" | "task";
1891
+ /** An issue field that `Issues.update` can clear: the value is removed, never replaced by a default. */
1892
+ type IssueClearable = "assignees" | "milestone" | "parent" | "kind" | "priority" | "effort" | "startDate" | "targetDate";
1893
+ /**
1894
+ * The fields of an issue beyond its title, text, labels, assignees and milestone, shared by `Issues.create` and
1895
+ * `Issues.update`. A field left out is left alone (on a new issue, unset).
1896
+ */
1897
+ interface IssueFields {
1898
+ /** The kind of issue. */
1899
+ kind?: IssueKind;
1900
+ /** How urgent it is; `none` sets nothing. */
1901
+ priority?: IssuePriority;
1902
+ /** How much work it is. */
1903
+ effort?: IssueEffort;
1904
+ /** When work starts, `YYYY-MM-DD`. */
1905
+ startDate?: string;
1906
+ /** When it is due, `YYYY-MM-DD`. */
1907
+ targetDate?: string;
1908
+ /** The key of the issue it is a sub-issue of. */
1909
+ parent?: string;
1910
+ /** Keys of the issues that block it. */
1911
+ blockedBy?: string[];
1912
+ }
1913
+ /** What {@link Issues.create} makes an issue from. */
1914
+ interface IssueCreateInput extends IssueFields {
1915
+ /** The title. */
1916
+ summary: string;
1917
+ /** The text. */
1918
+ body?: string;
1919
+ /** Label names; a label the tracker lacks is made where the tracker can. */
1920
+ labels?: string[];
1921
+ /** Numeric id or exact title (case-insensitive). */
1922
+ milestone?: string;
1923
+ /** People to assign, by login (or email or name on a tracker that has no logins); `me` is the token's user. */
1924
+ assignees?: string[];
1925
+ }
1926
+ /** What {@link Issues.update} changes. Only what is set is touched; nothing is cleared unless `clear` names it. */
1927
+ interface IssuePatch extends IssueFields {
1928
+ /** The new title. */
1929
+ title?: string;
1930
+ /** The new text, replacing the old. */
1931
+ body?: string;
1932
+ /** Open or close the issue. */
1933
+ state?: "open" | "closed";
1934
+ /** Why it is closed, for a provider that records one (GitHub's state reason); only read with `state: "closed"`. Default `completed`. */
1935
+ stateReason?: "completed" | "not_planned";
1936
+ /** Labels to add. */
1937
+ addLabels?: string[];
1938
+ /** Labels to remove; one the issue lacks is left. */
1939
+ removeLabels?: string[];
1940
+ /** The people it is assigned to, replacing the current ones. */
1941
+ assignees?: string[];
1942
+ /** The milestone (numeric id or exact title), replacing the current one. */
1943
+ milestone?: string;
1944
+ /** Keys of blockers to take off (`blockedBy` adds). */
1945
+ unblock?: string[];
1946
+ /** Fields to empty. A field named here and also set is refused by the caller, never by the provider. */
1947
+ clear?: IssueClearable[];
1948
+ }
1949
+ /** What {@link Issues.update} did. */
1950
+ interface IssueUpdateResult {
1951
+ /** The issue's key in the tracker's syntax. */
1952
+ key: string;
1953
+ /** What was changed, one phrase each, e.g. `effort: high`; empty when the issue was already as asked. */
1954
+ changed: string[];
1955
+ /** What the tracker cannot hold of the patch and so left out, e.g. `startDate (Linear has no start date)`. */
1956
+ dropped?: string[];
1957
+ }
1763
1958
  /** A comment on an issue, as a migration carries it. */
1764
1959
  interface IssueComment {
1765
1960
  /** Who wrote it, as a display name; the target cannot post as them, so it is named in the text. */
@@ -1892,19 +2087,17 @@ interface Issues extends ProviderIdentity {
1892
2087
  /** One issue by its human-readable key (e.g. `#42`). */
1893
2088
  get(key: string): Promise<Issue>;
1894
2089
  /** Open a new issue and return its key. */
1895
- create(input: {
1896
- summary: string;
1897
- body?: string;
1898
- labels?: string[];
1899
- /** Numeric id or exact title (case-insensitive). */
1900
- milestone?: string;
1901
- /** People to assign, by login (or email or name on a tracker that has no logins); `me` is the token's user. */
1902
- assignees?: string[];
1903
- }): Promise<{
2090
+ create(input: IssueCreateInput): Promise<{
1904
2091
  key: string;
1905
2092
  /** What the tracker cannot hold of the input and so left out, e.g. `assignee (no matching user): bob`. */
1906
2093
  dropped?: string[];
1907
2094
  }>;
2095
+ /**
2096
+ * Change an issue: title, text, state, labels, assignees, milestone and the {@link IssueFields}. Idempotent: what is
2097
+ * already as asked is not written again and is not in `changed`. A field the tracker cannot hold is in `dropped`,
2098
+ * never a failure. Optional: a provider without it is "not supported" to the caller.
2099
+ */
2100
+ update?(key: string, patch: IssuePatch): Promise<IssueUpdateResult>;
1908
2101
  /** Idempotent — `transitioned: false` if the issue is already at the target. */
1909
2102
  transition(key: string, slot: LifecycleSlot): Promise<LifecycleResult>;
1910
2103
  /** Add a comment to the issue. */
@@ -4977,4 +5170,4 @@ declare class WebhookVerificationError extends Error {
4977
5170
  }
4978
5171
  /** Whether `key` is a capability that can have several providers active at once. */
4979
5172
  declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
4980
- export { CoverageUploadInput as $, RepoVariablesSync as $i, RelayState as $n, Workers as $r, Issues as $t, Cache as A, DevConfig as Ai, NotificationsChannelLayout as An, ToolingOpenWant as Ar, EnsuredTunnel as At, ConnectionStringOptions as B, MultiEntry as Bi, NotificationsPinnedLayout as Bn, Vault as Br, IdeaRecord as Bt, BoardState as C, resolvePluginPackage as Ci, MonitoringStatusPageResult as Cn, ToolingDoctorReport as Cr, EnsureRelayInput as Ct, BoardTemplate as D, CapabilityConfigPackage as Di, Notifications as Dn, ToolingOpenInput as Dr, EnsureWebhookResult as Dt, BoardSummary as E, AppConfig as Ei, NormalizedAuthUser as En, ToolingExportResult as Er, EnsureResult as Et, CardinalityFor as F, EslintConfig as Fi, NotificationsLinksLayout as Fn, ToolingWorkspaceState as Fr, Errors as Ft, CoverageExpectations as G, RepoConfig as Gi, NotificationsSignedIn as Gn, WikiNavigationState as Gr, InspectRelayInput as Gt, CoverageConfigComponent as H, ProviderOptions as Hi, NotificationsReaction as Hn, Wiki as Hr, ImportOptions as Ht, Ci as I, GitHubAppConfig as Ii, NotificationsMember as In, TrackerDoctorReport as Ir, ErrorsInspection as It, CoverageStatusContext as J, RepoSecrets as Ji, PagesConfig as Jn, WikiProvisionOpts as Jr, IssueOrder as Jt, CoverageNameDiff as K, RepoProperties as Ki, NotificationsWelcomeLayout as Kn, WikiOrganizationState as Kr, Issue as Kt, CiRun as L, HolocronConfig as Li, NotificationsMonitoringFeed as Ln, TrackerUser as Lr, ErrorsOrgState as Lt, CapabilityImpls as M, DocsConfig as Mi, NotificationsEveryoneLayout as Mn, ToolingWorkspaceInput as Mr, EnvironmentEntry as Mt, CapabilityKey as N, DoctorConfig as Ni, NotificationsForumTag as Nn, ToolingWorkspaceResult as Nr, EnvironmentReviewer as Nt, BoardTemplateFile as O, ChromaticProjectConfig as Oi, NotificationsAccess as On, ToolingOpenLaunch as Or, EnsuredDiscussion as Ot, Cardinality as P, EnvConfig as Pi, NotificationsLayout as Pn, ToolingWorkspaceSide as Pr, Environments as Pt, CoverageUploadGroup as Q, RepoVariables as Qi, PullRequest as Qn, WorkerScriptState as Qr, IssueSelector as Qt, CiRunFilter as R, IdeasConfig as Ri, NotificationsOnboardingLayout as Rn, TunnelRoute as Rr, ErrorsProjectState as Rt, BoardRule as S, resolveEntry as Si, MonitoringStatusPageInput as Sn, Tooling as Sr, EnsureDiscussionInput as St, BoardStatusCategory as T, AgentOptions as Ti, MoveReport as Tn, ToolingExportIssue as Tr, EnsureReport as Tt, CoverageConfigDocumentation as U, RawProviderEntry as Ui, NotificationsServerLayout as Un, WikiInspection as Ur, ImportResult as Ut, Coverage as V, OrgConfig as Vi, NotificationsPrsFeed as Vn, WebhookDashboardInfo as Vr, Ideas as Vt, CoverageConfigInput as W, RawProvidersConfig as Wi, NotificationsSignIn as Wn, WikiInstanceState as Wr, InspectErrorsInput as Wt, CoverageTokenCheck as X, RepoSecretsSync as Xi, Projects as Xn, WikiPublishedState as Xr, IssueRecord as Xt, CoverageStatusInput as Y, RepoSecretsDeploy as Yi, ParseWebhookInput as Yn, WikiProxyConfig as Yr, IssuePriority as Yt, CoverageUploadFlagResult as Z, RepoValidationConfig as Zi, ProviderIdentity as Zn, WorkerDeploymentState as Zr, IssueSearchFilter as Zt, BoardFieldType as _, ComposedPreset as _i, MonitoringHeartbeatInput as _n, Storage as _r, DnsRecord as _t, REQUIRED_CAPABILITIES as a, StorybookDeployProject as aa, missingCapabilities as ai, Monitoring as an, SecretScope as ar, DeployFunctionResult as at, BoardPullRequest as b, credentialsEnvironment as bi, MonitoringHttpMethod as bn, TeamEntry as br, DuplicateDiscussion as bt, AddedItem as c, WorkflowWithConfig as ca, HolocronProfile as ci, MonitoringAlertChannelState as cn, ServerInspection as cr, Deployment as ct, AuthDescription as d, ConfigFileError as di, MonitoringAssertionComparison as dn, SourceFile as dr, DeploymentRecord as dt, ResolvedHolocronConfig as ea, KNOWN_STACK_DEPS as ei, LabelDef as en, RepoRef as er, CoverageUploadResult as et, AuthEvent as f, compose as fi, MonitoringAssertionSource as fn, SourceRepoInfo as fr, DeploymentTarget as ft, BoardField as g, Capability as gi, MonitoringDashboardState as gn, StatusCategory as gr, Dns as gt, AuthUser as h, LoadedConfig as hi, MonitoringDashboardInput as hn, SourceTeamMember as hr, DiscussionPost as ht, ProviderApiError as i, SingleEntry as ia, deriveStack as ii, LogsDataset as in, SecretAccess as ir, DeployFunctionConfig as it, CacheTokenCheck as j, DevServeConfig as ji, NotificationsDelivery as jn, ToolingWorkspaceFile as jr, Environment as jt, BoardView as k, CredentialsConfig as ki, NotificationsApplicationLayout as kn, ToolingOpenPlan as kr, EnsuredResource as kt, Analytics as l, EnvironmentLayer as la, PackageJsonLike as li, MonitoringAlertSettings as ln, Source as lr, DeploymentProject as lt, AuthIdentity as m, loadConfig as mi, MonitoringCheckInput as mn, SourceSecurity as mr, DiscussionPatch as mt, ElevationRequiredError as n, ResolvedProvidersConfig as na, deriveCompliance as ni, LifecycleSlot as nn, ResolvedCapability as nr, Credentials as nt, WebhookVerificationError as o, TaskEntryConfig as oa, readWorkspacePackageJsons as oi, MonitoringAlertChannelInput as on, SecretVisibility as or, DeployScriptConfig as ot, AuthEventType as p, defineConfig as pi, MonitoringCheck as pn, SourceRulesetDetail as pr, DeploymentTrigger as pt, CoverageRepoReport as q, RepoProtection as qi, OrganizationSecretScope as qn, WikiProbe as qr, IssueComment as qt, MissingTokenError as r, ResolvedTuple as ra, deriveProfile as ri, Logs as rn, Ruleset as rr, CredentialsInspection as rt, isMulti as s, TelemetryConfig as sa, DeriveProfileInput as si, MonitoringAlertChannelResult as sn, Secrets as sr, DeployScriptResult as st, CARDINALITY as t, ResolvedProviderEntry as ta, deriveCapabilities as ti, LifecycleResult as tn, RepoSettings as tr, CreateAuthUserInput as tt, Auth as u, StackName as ui, MonitoringAssertion as un, SourceBranch as ur, DeploymentProjectSettings as ut, BoardItem as v, TaskEntry as vi, MonitoringHeartbeatResult as vn, StorageBranch as vr, DnsRecordRequest as vt, BoardStatus as w, AgentName as wi, MonitoringStatusPageState as wn, ToolingExportInput as wr, EnsureRelayResult as wt, BoardPullRequestChecks as x, resolveConfig as xi, MonitoringStatusComponentInput as xn, TeamPermission as xr, EmojiCheck as xt, BoardItemInput as y, ConfigError as yi, MonitoringHeartbeatUnit as yn, SyncResult as yr, DnsRecordType as yt, CiRunStatus as z, LogConfig as zi, NotificationsPicture as zn, Tunnels as zr, ExportInfo as zt };
5173
+ export { CoverageUploadInput as $, LogConfig as $i, NotificationsWelcomeLayout as $n, Tunnels as $r, IssueOrder as $t, Cache as A, Capability as Ai, MonitoringStatusPageResult as An, StatusCategory as Ar, EnsuredTunnel as At, ConnectionStringOptions as B, AppConfig as Bi, NotificationsForumTag as Bn, ToolingExportResult as Br, IdeaRecord as Bt, BoardState as C, WorkflowWithConfig as Ca, PackageJsonLike as Ci, MonitoringDashboardState as Cn, Source as Cr, EnsureRelayInput as Ct, BoardTemplate as D, defineConfig as Di, MonitoringHttpMethod as Dn, SourceRulesetDetail as Dr, EnsureWebhookResult as Dt, BoardSummary as E, compose as Ei, MonitoringHeartbeatUnit as En, SourceRepoInfo as Er, EnsureResult as Et, CardinalityFor as F, resolveConfig as Fi, NotificationsAccess as Fn, TeamPermission as Fr, Errors as Ft, CoverageExpectations as G, DevServeConfig as Gi, NotificationsOnboardingLayout as Gn, ToolingWorkspaceFile as Gr, InspectRelayInput as Gt, CoverageConfigComponent as H, ChromaticProjectConfig as Hi, NotificationsLinksLayout as Hn, ToolingOpenLaunch as Hr, ImportOptions as Ht, Ci as I, resolveEntry as Ii, NotificationsApplicationLayout as In, Tooling as Ir, ErrorsInspection as It, CoverageStatusContext as J, EnvConfig as Ji, NotificationsPrsFeed as Jn, ToolingWorkspaceSide as Jr, IssueComment as Jt, CoverageNameDiff as K, DocsConfig as Ki, NotificationsPicture as Kn, ToolingWorkspaceInput as Kr, Issue as Kt, CiRun as L, resolvePluginPackage as Li, NotificationsChannelLayout as Ln, ToolingDoctorReport as Lr, ErrorsOrgState as Lt, CapabilityImpls as M, TaskEntry as Mi, MoveReport as Mn, StorageBranch as Mr, EnvironmentEntry as Mt, CapabilityKey as N, ConfigError as Ni, NormalizedAuthUser as Nn, SyncResult as Nr, EnvironmentReviewer as Nt, BoardTemplateFile as O, loadConfig as Oi, MonitoringStatusComponentInput as On, SourceSecurity as Or, EnsuredDiscussion as Ot, Cardinality as P, credentialsEnvironment as Pi, Notifications as Pn, TeamEntry as Pr, Environments as Pt, CoverageUploadGroup as Q, IdeasConfig as Qi, NotificationsSignedIn as Qn, TunnelRoute as Qr, IssueKind as Qt, CiRunFilter as R, AgentName as Ri, NotificationsDelivery as Rn, ToolingExportInput as Rr, ErrorsProjectState as Rt, BoardRule as S, TelemetryConfig as Sa, HolocronProfile as Si, MonitoringDashboardInput as Sn, ServerInspection as Sr, EnsureDiscussionInput as St, BoardStatusCategory as T, ConfigFileError as Ti, MonitoringHeartbeatResult as Tn, SourceFile as Tr, EnsureReport as Tt, CoverageConfigDocumentation as U, CredentialsConfig as Ui, NotificationsMember as Un, ToolingOpenPlan as Ur, ImportResult as Ut, Coverage as V, CapabilityConfigPackage as Vi, NotificationsLayout as Vn, ToolingOpenInput as Vr, Ideas as Vt, CoverageConfigInput as W, DevConfig as Wi, NotificationsMonitoringFeed as Wn, ToolingOpenWant as Wr, InspectErrorsInput as Wt, CoverageTokenCheck as X, GitHubAppConfig as Xi, NotificationsServerLayout as Xn, TrackerDoctorReport as Xr, IssueEffort as Xt, CoverageStatusInput as Y, EslintConfig as Yi, NotificationsReaction as Yn, ToolingWorkspaceState as Yr, IssueCreateInput as Yt, CoverageUploadFlagResult as Z, HolocronConfig as Zi, NotificationsSignIn as Zn, TrackerUser as Zr, IssueFields as Zt, BoardFieldType as _, ResolvedProvidersConfig as _a, deriveProfile as _i, MonitoringAssertion as _n, Ruleset as _r, DnsRecord as _t, REQUIRED_CAPABILITIES as a, RepoConfig as aa, WikiNavigationState as ai, IssueUpdateResult as an, PullRequest as ar, DeployFunctionResult as at, BoardPullRequest as b, StorybookDeployProject as ba, readWorkspacePackageJsons as bi, MonitoringCheck as bn, SecretVisibility as br, DuplicateDiscussion as bt, AddedItem as c, RepoProtection as ca, WikiProvisionOpts as ci, LifecycleResult as cn, PullRequestFields as cr, Deployment as ct, AuthDescription as d, RepoSecretsSync as da, WorkerDeploymentState as di, LogsDataset as dn, PullRequestPatch as dr, DeploymentRecord as dt, MultiEntry as ea, Vault as ei, IssuePatch as en, OrganizationSecretScope as er, CoverageUploadResult as et, AuthEvent as f, RepoValidationConfig as fa, WorkerScriptState as fi, Monitoring as fn, PullRequestResult as fr, DeploymentTarget as ft, BoardField as g, ResolvedProviderEntry as ga, deriveCompliance as gi, MonitoringAlertSettings as gn, ResolvedCapability as gr, Dns as gt, AuthUser as h, ResolvedHolocronConfig as ha, deriveCapabilities as hi, MonitoringAlertChannelState as hn, RepoSettings as hr, DiscussionPost as ht, ProviderApiError as i, RawProvidersConfig as ia, WikiInstanceState as ii, IssueSelector as in, ProviderIdentity as ir, DeployFunctionConfig as it, CacheTokenCheck as j, ComposedPreset as ji, MonitoringStatusPageState as jn, Storage as jr, Environment as jt, BoardView as k, LoadedConfig as ki, MonitoringStatusPageInput as kn, SourceTeamMember as kr, EnsuredResource as kt, Analytics as l, RepoSecrets as la, WikiProxyConfig as li, LifecycleSlot as ln, PullRequestInput as lr, DeploymentProject as lt, AuthIdentity as m, RepoVariablesSync as ma, KNOWN_STACK_DEPS as mi, MonitoringAlertChannelResult as mn, RepoRef as mr, DiscussionPatch as mt, ElevationRequiredError as n, ProviderOptions as na, Wiki as ni, IssueRecord as nn, ParseWebhookInput as nr, Credentials as nt, WebhookVerificationError as o, RepoLabels as oa, WikiOrganizationState as oi, Issues as on, PullRequestChecks as or, DeployScriptConfig as ot, AuthEventType as p, RepoVariables as pa, Workers as pi, MonitoringAlertChannelInput as pn, RelayState as pr, DeploymentTrigger as pt, CoverageRepoReport as q, DoctorConfig as qi, NotificationsPinnedLayout as qn, ToolingWorkspaceResult as qr, IssueClearable as qt, MissingTokenError as r, RawProviderEntry as ra, WikiInspection as ri, IssueSearchFilter as rn, Projects as rr, CredentialsInspection as rt, isMulti as s, RepoProperties as sa, WikiProbe as si, LabelDef as sn, PullRequestChecksState as sr, DeployScriptResult as st, CARDINALITY as t, OrgConfig as ta, WebhookDashboardInfo as ti, IssuePriority as tn, PagesConfig as tr, CreateAuthUserInput as tt, Auth as u, RepoSecretsDeploy as ua, WikiPublishedState as ui, Logs as un, PullRequestLink as ur, DeploymentProjectSettings as ut, BoardItem as v, ResolvedTuple as va, deriveStack as vi, MonitoringAssertionComparison as vn, SecretAccess as vr, DnsRecordRequest as vt, BoardStatus as w, EnvironmentLayer as wa, StackName as wi, MonitoringHeartbeatInput as wn, SourceBranch as wr, EnsureRelayResult as wt, BoardPullRequestChecks as x, TaskEntryConfig as xa, DeriveProfileInput as xi, MonitoringCheckInput as xn, Secrets as xr, EmojiCheck as xt, BoardItemInput as y, SingleEntry as ya, missingCapabilities as yi, MonitoringAssertionSource as yn, SecretScope as yr, DnsRecordType as yt, CiRunStatus as z, AgentOptions as zi, NotificationsEveryoneLayout as zn, ToolingExportIssue as zr, ExportInfo as zt };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as CoverageUploadInput, $i as RepoVariablesSync, $n as RelayState, $r as Workers, $t as Issues, A as Cache, Ai as DevConfig, An as NotificationsChannelLayout, Ar as ToolingOpenWant, At as EnsuredTunnel, B as ConnectionStringOptions, Bi as MultiEntry, Bn as NotificationsPinnedLayout, Br as Vault, Bt as IdeaRecord, C as BoardState, Ci as resolvePluginPackage, Cn as MonitoringStatusPageResult, Cr as ToolingDoctorReport, Ct as EnsureRelayInput, D as BoardTemplate, Di as CapabilityConfigPackage, Dn as Notifications, Dr as ToolingOpenInput, Dt as EnsureWebhookResult, E as BoardSummary, Ei as AppConfig, En as NormalizedAuthUser, Er as ToolingExportResult, Et as EnsureResult, F as CardinalityFor, Fi as EslintConfig, Fn as NotificationsLinksLayout, Fr as ToolingWorkspaceState, Ft as Errors, G as CoverageExpectations, Gi as RepoConfig, Gn as NotificationsSignedIn, Gr as WikiNavigationState, Gt as InspectRelayInput, H as CoverageConfigComponent, Hi as ProviderOptions, Hn as NotificationsReaction, Hr as Wiki, Ht as ImportOptions, I as Ci, Ii as GitHubAppConfig, In as NotificationsMember, Ir as TrackerDoctorReport, It as ErrorsInspection, J as CoverageStatusContext, Ji as RepoSecrets, Jn as PagesConfig, Jr as WikiProvisionOpts, Jt as IssueOrder, K as CoverageNameDiff, Ki as RepoProperties, Kn as NotificationsWelcomeLayout, Kr as WikiOrganizationState, Kt as Issue, L as CiRun, Li as HolocronConfig, Ln as NotificationsMonitoringFeed, Lr as TrackerUser, Lt as ErrorsOrgState, M as CapabilityImpls, Mi as DocsConfig, Mn as NotificationsEveryoneLayout, Mr as ToolingWorkspaceInput, Mt as EnvironmentEntry, N as CapabilityKey, Ni as DoctorConfig, Nn as NotificationsForumTag, Nr as ToolingWorkspaceResult, Nt as EnvironmentReviewer, O as BoardTemplateFile, Oi as ChromaticProjectConfig, On as NotificationsAccess, Or as ToolingOpenLaunch, Ot as EnsuredDiscussion, P as Cardinality, Pi as EnvConfig, Pn as NotificationsLayout, Pr as ToolingWorkspaceSide, Pt as Environments, Q as CoverageUploadGroup, Qi as RepoVariables, Qn as PullRequest, Qr as WorkerScriptState, Qt as IssueSelector, R as CiRunFilter, Ri as IdeasConfig, Rn as NotificationsOnboardingLayout, Rr as TunnelRoute, Rt as ErrorsProjectState, S as BoardRule, Si as resolveEntry, Sn as MonitoringStatusPageInput, Sr as Tooling, St as EnsureDiscussionInput, T as BoardStatusCategory, Ti as AgentOptions, Tn as MoveReport, Tr as ToolingExportIssue, Tt as EnsureReport, U as CoverageConfigDocumentation, Ui as RawProviderEntry, Un as NotificationsServerLayout, Ur as WikiInspection, Ut as ImportResult, V as Coverage, Vi as OrgConfig, Vn as NotificationsPrsFeed, Vr as WebhookDashboardInfo, Vt as Ideas, W as CoverageConfigInput, Wi as RawProvidersConfig, Wn as NotificationsSignIn, Wr as WikiInstanceState, Wt as InspectErrorsInput, X as CoverageTokenCheck, Xi as RepoSecretsSync, Xn as Projects, Xr as WikiPublishedState, Xt as IssueRecord, Y as CoverageStatusInput, Yi as RepoSecretsDeploy, Yn as ParseWebhookInput, Yr as WikiProxyConfig, Yt as IssuePriority, Z as CoverageUploadFlagResult, Zi as RepoValidationConfig, Zn as ProviderIdentity, Zr as WorkerDeploymentState, Zt as IssueSearchFilter, _ as BoardFieldType, _i as ComposedPreset, _n as MonitoringHeartbeatInput, _r as Storage, _t as DnsRecord, a as REQUIRED_CAPABILITIES, aa as StorybookDeployProject, ai as missingCapabilities, an as Monitoring, ar as SecretScope, at as DeployFunctionResult, b as BoardPullRequest, bi as credentialsEnvironment, bn as MonitoringHttpMethod, br as TeamEntry, bt as DuplicateDiscussion, c as AddedItem, ca as WorkflowWithConfig, ci as HolocronProfile, cn as MonitoringAlertChannelState, cr as ServerInspection, ct as Deployment, d as AuthDescription, di as ConfigFileError, dn as MonitoringAssertionComparison, dr as SourceFile, dt as DeploymentRecord, ea as ResolvedHolocronConfig, ei as KNOWN_STACK_DEPS, en as LabelDef, er as RepoRef, et as CoverageUploadResult, f as AuthEvent, fi as compose, fn as MonitoringAssertionSource, fr as SourceRepoInfo, ft as DeploymentTarget, g as BoardField, gi as Capability, gn as MonitoringDashboardState, gr as StatusCategory, gt as Dns, h as AuthUser, hi as LoadedConfig, hn as MonitoringDashboardInput, hr as SourceTeamMember, ht as DiscussionPost, i as ProviderApiError, ia as SingleEntry, ii as deriveStack, in as LogsDataset, ir as SecretAccess, it as DeployFunctionConfig, j as CacheTokenCheck, ji as DevServeConfig, jn as NotificationsDelivery, jr as ToolingWorkspaceFile, jt as Environment, k as BoardView, ki as CredentialsConfig, kn as NotificationsApplicationLayout, kr as ToolingOpenPlan, kt as EnsuredResource, l as Analytics, la as EnvironmentLayer, li as PackageJsonLike, ln as MonitoringAlertSettings, lr as Source, lt as DeploymentProject, m as AuthIdentity, mi as loadConfig, mn as MonitoringCheckInput, mr as SourceSecurity, mt as DiscussionPatch, n as ElevationRequiredError, na as ResolvedProvidersConfig, ni as deriveCompliance, nn as LifecycleSlot, nr as ResolvedCapability, nt as Credentials, o as WebhookVerificationError, oa as TaskEntryConfig, oi as readWorkspacePackageJsons, on as MonitoringAlertChannelInput, or as SecretVisibility, ot as DeployScriptConfig, p as AuthEventType, pi as defineConfig, pn as MonitoringCheck, pr as SourceRulesetDetail, pt as DeploymentTrigger, q as CoverageRepoReport, qi as RepoProtection, qn as OrganizationSecretScope, qr as WikiProbe, qt as IssueComment, r as MissingTokenError, ra as ResolvedTuple, ri as deriveProfile, rn as Logs, rr as Ruleset, rt as CredentialsInspection, s as isMulti, sa as TelemetryConfig, si as DeriveProfileInput, sn as MonitoringAlertChannelResult, sr as Secrets, st as DeployScriptResult, t as CARDINALITY, ta as ResolvedProviderEntry, ti as deriveCapabilities, tn as LifecycleResult, tr as RepoSettings, tt as CreateAuthUserInput, u as Auth, ui as StackName, un as MonitoringAssertion, ur as SourceBranch, ut as DeploymentProjectSettings, v as BoardItem, vi as TaskEntry, vn as MonitoringHeartbeatResult, vr as StorageBranch, vt as DnsRecordRequest, w as BoardStatus, wi as AgentName, wn as MonitoringStatusPageState, wr as ToolingExportInput, wt as EnsureRelayResult, x as BoardPullRequestChecks, xi as resolveConfig, xn as MonitoringStatusComponentInput, xr as TeamPermission, xt as EmojiCheck, y as BoardItemInput, yi as ConfigError, yn as MonitoringHeartbeatUnit, yr as SyncResult, yt as DnsRecordType, z as CiRunStatus, zi as LogConfig, zn as NotificationsPicture, zr as Tunnels, zt as ExportInfo } from "./index-YQmgeAuP.mjs";
1
+ import { $ as CoverageUploadInput, $i as LogConfig, $n as NotificationsWelcomeLayout, $r as Tunnels, $t as IssueOrder, A as Cache, Ai as Capability, An as MonitoringStatusPageResult, Ar as StatusCategory, At as EnsuredTunnel, B as ConnectionStringOptions, Bi as AppConfig, Bn as NotificationsForumTag, Br as ToolingExportResult, Bt as IdeaRecord, C as BoardState, Ca as WorkflowWithConfig, Ci as PackageJsonLike, Cn as MonitoringDashboardState, Cr as Source, Ct as EnsureRelayInput, D as BoardTemplate, Di as defineConfig, Dn as MonitoringHttpMethod, Dr as SourceRulesetDetail, Dt as EnsureWebhookResult, E as BoardSummary, Ei as compose, En as MonitoringHeartbeatUnit, Er as SourceRepoInfo, Et as EnsureResult, F as CardinalityFor, Fi as resolveConfig, Fn as NotificationsAccess, Fr as TeamPermission, Ft as Errors, G as CoverageExpectations, Gi as DevServeConfig, Gn as NotificationsOnboardingLayout, Gr as ToolingWorkspaceFile, Gt as InspectRelayInput, H as CoverageConfigComponent, Hi as ChromaticProjectConfig, Hn as NotificationsLinksLayout, Hr as ToolingOpenLaunch, Ht as ImportOptions, I as Ci, Ii as resolveEntry, In as NotificationsApplicationLayout, Ir as Tooling, It as ErrorsInspection, J as CoverageStatusContext, Ji as EnvConfig, Jn as NotificationsPrsFeed, Jr as ToolingWorkspaceSide, Jt as IssueComment, K as CoverageNameDiff, Ki as DocsConfig, Kn as NotificationsPicture, Kr as ToolingWorkspaceInput, Kt as Issue, L as CiRun, Li as resolvePluginPackage, Ln as NotificationsChannelLayout, Lr as ToolingDoctorReport, Lt as ErrorsOrgState, M as CapabilityImpls, Mi as TaskEntry, Mn as MoveReport, Mr as StorageBranch, Mt as EnvironmentEntry, N as CapabilityKey, Ni as ConfigError, Nn as NormalizedAuthUser, Nr as SyncResult, Nt as EnvironmentReviewer, O as BoardTemplateFile, Oi as loadConfig, On as MonitoringStatusComponentInput, Or as SourceSecurity, Ot as EnsuredDiscussion, P as Cardinality, Pi as credentialsEnvironment, Pn as Notifications, Pr as TeamEntry, Pt as Environments, Q as CoverageUploadGroup, Qi as IdeasConfig, Qn as NotificationsSignedIn, Qr as TunnelRoute, Qt as IssueKind, R as CiRunFilter, Ri as AgentName, Rn as NotificationsDelivery, Rr as ToolingExportInput, Rt as ErrorsProjectState, S as BoardRule, Sa as TelemetryConfig, Si as HolocronProfile, Sn as MonitoringDashboardInput, Sr as ServerInspection, St as EnsureDiscussionInput, T as BoardStatusCategory, Ti as ConfigFileError, Tn as MonitoringHeartbeatResult, Tr as SourceFile, Tt as EnsureReport, U as CoverageConfigDocumentation, Ui as CredentialsConfig, Un as NotificationsMember, Ur as ToolingOpenPlan, Ut as ImportResult, V as Coverage, Vi as CapabilityConfigPackage, Vn as NotificationsLayout, Vr as ToolingOpenInput, Vt as Ideas, W as CoverageConfigInput, Wi as DevConfig, Wn as NotificationsMonitoringFeed, Wr as ToolingOpenWant, Wt as InspectErrorsInput, X as CoverageTokenCheck, Xi as GitHubAppConfig, Xn as NotificationsServerLayout, Xr as TrackerDoctorReport, Xt as IssueEffort, Y as CoverageStatusInput, Yi as EslintConfig, Yn as NotificationsReaction, Yr as ToolingWorkspaceState, Yt as IssueCreateInput, Z as CoverageUploadFlagResult, Zi as HolocronConfig, Zn as NotificationsSignIn, Zr as TrackerUser, Zt as IssueFields, _ as BoardFieldType, _a as ResolvedProvidersConfig, _i as deriveProfile, _n as MonitoringAssertion, _r as Ruleset, _t as DnsRecord, a as REQUIRED_CAPABILITIES, aa as RepoConfig, ai as WikiNavigationState, an as IssueUpdateResult, ar as PullRequest, at as DeployFunctionResult, b as BoardPullRequest, ba as StorybookDeployProject, bi as readWorkspacePackageJsons, bn as MonitoringCheck, br as SecretVisibility, bt as DuplicateDiscussion, c as AddedItem, ca as RepoProtection, ci as WikiProvisionOpts, cn as LifecycleResult, cr as PullRequestFields, ct as Deployment, d as AuthDescription, da as RepoSecretsSync, di as WorkerDeploymentState, dn as LogsDataset, dr as PullRequestPatch, dt as DeploymentRecord, ea as MultiEntry, ei as Vault, en as IssuePatch, er as OrganizationSecretScope, et as CoverageUploadResult, f as AuthEvent, fa as RepoValidationConfig, fi as WorkerScriptState, fn as Monitoring, fr as PullRequestResult, ft as DeploymentTarget, g as BoardField, ga as ResolvedProviderEntry, gi as deriveCompliance, gn as MonitoringAlertSettings, gr as ResolvedCapability, gt as Dns, h as AuthUser, ha as ResolvedHolocronConfig, hi as deriveCapabilities, hn as MonitoringAlertChannelState, hr as RepoSettings, ht as DiscussionPost, i as ProviderApiError, ia as RawProvidersConfig, ii as WikiInstanceState, in as IssueSelector, ir as ProviderIdentity, it as DeployFunctionConfig, j as CacheTokenCheck, ji as ComposedPreset, jn as MonitoringStatusPageState, jr as Storage, jt as Environment, k as BoardView, ki as LoadedConfig, kn as MonitoringStatusPageInput, kr as SourceTeamMember, kt as EnsuredResource, l as Analytics, la as RepoSecrets, li as WikiProxyConfig, ln as LifecycleSlot, lr as PullRequestInput, lt as DeploymentProject, m as AuthIdentity, ma as RepoVariablesSync, mi as KNOWN_STACK_DEPS, mn as MonitoringAlertChannelResult, mr as RepoRef, mt as DiscussionPatch, n as ElevationRequiredError, na as ProviderOptions, ni as Wiki, nn as IssueRecord, nr as ParseWebhookInput, nt as Credentials, o as WebhookVerificationError, oa as RepoLabels, oi as WikiOrganizationState, on as Issues, or as PullRequestChecks, ot as DeployScriptConfig, p as AuthEventType, pa as RepoVariables, pi as Workers, pn as MonitoringAlertChannelInput, pr as RelayState, pt as DeploymentTrigger, q as CoverageRepoReport, qi as DoctorConfig, qn as NotificationsPinnedLayout, qr as ToolingWorkspaceResult, qt as IssueClearable, r as MissingTokenError, ra as RawProviderEntry, ri as WikiInspection, rn as IssueSearchFilter, rr as Projects, rt as CredentialsInspection, s as isMulti, sa as RepoProperties, si as WikiProbe, sn as LabelDef, sr as PullRequestChecksState, st as DeployScriptResult, t as CARDINALITY, ta as OrgConfig, ti as WebhookDashboardInfo, tn as IssuePriority, tr as PagesConfig, tt as CreateAuthUserInput, u as Auth, ua as RepoSecretsDeploy, ui as WikiPublishedState, un as Logs, ur as PullRequestLink, ut as DeploymentProjectSettings, v as BoardItem, va as ResolvedTuple, vi as deriveStack, vn as MonitoringAssertionComparison, vr as SecretAccess, vt as DnsRecordRequest, w as BoardStatus, wa as EnvironmentLayer, wi as StackName, wn as MonitoringHeartbeatInput, wr as SourceBranch, wt as EnsureRelayResult, x as BoardPullRequestChecks, xa as TaskEntryConfig, xi as DeriveProfileInput, xn as MonitoringCheckInput, xr as Secrets, xt as EmojiCheck, y as BoardItemInput, ya as SingleEntry, yi as missingCapabilities, yn as MonitoringAssertionSource, yr as SecretScope, yt as DnsRecordType, z as CiRunStatus, zi as AgentOptions, zn as NotificationsEveryoneLayout, zr as ToolingExportIssue, zt as ExportInfo } from "./index-D2xS12Vc.mjs";
2
2
  import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, resolveValue } from "@theholocron/kyber/secrets";
3
3
  import { DocsCoverageMode } from "@theholocron/astromech";
4
4
  import { CheckRow } from "@theholocron/kyber/ui";
@@ -658,6 +658,48 @@ export declare const CANONICAL_LABELS: readonly [{
658
658
  readonly color: "ffffff";
659
659
  readonly description: "Won't be addressed";
660
660
  }];
661
+ /**
662
+ * The area a title scope means, by `repo.labels.scopes` (spec `tech-github-area-labels`): `sentinel` gives the area it is
663
+ * mapped to. The scope is matched without regard to case; a scope the map does not name, or a repo with no map, gives
664
+ * `undefined`. It is the area's name, not its label: `areaLabelsForTitle()` adds the prefix.
665
+ */
666
+ export declare function areaForScope(scope: string, scopes: Record<string, string> | undefined): string | undefined;
667
+ /** The colour of every area label: one family, one colour (spec `tech-github-area-labels`). */
668
+ export declare const AREA_LABEL_COLOR = "c5def5";
669
+ /**
670
+ * The labels `holocron setup` makes for the areas a repo declares: `area:<name>`, the one family colour and the
671
+ * description `Changes under <paths>` from the area's own (not excluded) patterns, cut to GitHub's 100 characters. They
672
+ * are never part of `CANONICAL_LABELS`: an area names this repo's folders, so another repo has none of them.
673
+ */
674
+ export declare function areaLabelDefs(areas: Record<string, string[]> | undefined): LabelDef[];
675
+ /**
676
+ * The `area:<name>` labels a set of changed paths earns, in the order the areas are declared (spec
677
+ * `tech-github-area-labels`). An area's patterns are the ones in `repo.labels.areas`; one starting with `!` takes a path
678
+ * out of the area (`docs/**` with `!docs/wiki/**`), so a path is in an area when some pattern includes it and none
679
+ * excludes it. A path in no area earns nothing, which is right, not a failure. This is the one mapping from changed
680
+ * folders to labels in the CLI; Sentinel's `planAreaLabels()` is meant to agree with it.
681
+ */
682
+ export declare function areaLabelsForFiles(files: readonly string[], areas: Record<string, string[]> | undefined): string[];
683
+ /**
684
+ * The `area:<name>` labels the scopes of an issue's title earn, through `repo.labels.scopes` (spec
685
+ * `tech-github-area-labels`): `feat(sentinel): ...` gives `["area:sentinel"]`. An issue has no changed files, so this is
686
+ * its only source of an area. A title with no scope, or a scope the map does not name, earns nothing; the same area
687
+ * from two scopes is given once, in the order of the title.
688
+ */
689
+ export declare function areaLabelsForTitle(title: string, scopes: Record<string, string> | undefined): string[];
690
+ /** The prefix of an area label (spec `tech-github-area-labels`): `area:cli`. */
691
+ export declare const AREA_PREFIX = "area:";
692
+ /**
693
+ * Whether a repository path (forward slashes, from the root) matches one pattern of `repo.labels.areas`. A pattern with
694
+ * a `*` or `?` is a glob (`cli/**`, `docs/**` then `/*.md`); one without is a file (`turbo.json`) or a folder and
695
+ * everything under it (`.holocron`, `.holocron/`).
696
+ */
697
+ export declare function pathMatches(path: string, pattern: string): boolean;
698
+ /**
699
+ * The scopes of a Conventional Commit title: `feat(sentinel): ...` gives `["sentinel"]`, `fix(cli, docs)!: ...` gives
700
+ * `["cli", "docs"]`. A title with no scope, or that is not in the `type(scope): subject` form, gives none.
701
+ */
702
+ export declare function titleScopes(title: string): string[];
661
703
  /** What one token must carry in one layer, as `tokenExpectations()` reads it from a plugin's `PluginToken.expect`. */
662
704
  interface LayerTokenExpectation {
663
705
  /** The token's plugin environment variable (`PluginToken.envName`), its identity in the plugin's list. */
@@ -763,4 +805,4 @@ export declare const SHARED_AREAS: readonly ["org"];
763
805
  * is a `ConfigError` naming both (no merge, no precedence). With no area files the config is returned as it was.
764
806
  */
765
807
  export declare function placeAreas(areas: ConfigDirArea[], raw: HolocronConfig): HolocronConfig;
766
- export { AddedItem, type AgentName, type AgentOptions, Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, type AuthExportOutKind, AuthIdentity, AuthUser, type BoardDeclaration, BoardField, BoardFieldType, BoardItem, BoardItemInput, BoardPullRequest, BoardPullRequestChecks, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, Cache, CacheTokenCheck, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, Coverage, CoverageConfigComponent, CoverageConfigDocumentation, CoverageConfigInput, CoverageExpectations, CoverageNameDiff, CoverageRepoReport, CoverageStatusContext, CoverageStatusInput, CoverageTokenCheck, CoverageUploadFlagResult, CoverageUploadGroup, CoverageUploadInput, CoverageUploadResult, CreateAuthUserInput, Credentials, type CredentialsConfig, CredentialsInspection, type CustomReaction, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, type DeriveProfileInput, type DevConfig, type DevServeConfig, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, type DocsConfig, type DoctorConfig, DuplicateDiscussion, ElevationRequiredError, EmojiCheck, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentEntry, type EnvironmentLayer, EnvironmentReviewer, Environments, Errors, ErrorsInspection, ErrorsOrgState, ErrorsProjectState, type EslintConfig, ExportInfo, type FeatureResolver, type FeatureResolverConfig, type GitHubAppConfig, type HolocronConfig, type HolocronProfile, IdeaRecord, Ideas, type IdeasConfig, ImportOptions, ImportResult, InspectErrorsInput, InspectRelayInput, Issue, IssueComment, IssueOrder, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, Issues, KNOWN_STACK_DEPS, LabelDef, type LayerTokenExpectation, type LayoutEmoji, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, LogsDataset, type MemberLink, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringDashboardInput, MonitoringDashboardState, MonitoringHeartbeatInput, MonitoringHeartbeatResult, MonitoringHeartbeatUnit, MonitoringHttpMethod, MonitoringStatusComponentInput, MonitoringStatusPageInput, MonitoringStatusPageResult, MonitoringStatusPageState, MoveReport, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsPrsFeed, NotificationsReaction, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type OrgConfig, OrganizationSecretScope, type PackageJsonLike, PagesConfig, ParseWebhookInput, type ParsedReaction, type PermissionRule, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, type ProjectOptions, Projects, type ProviderAction, type ProviderActionContext, type ProviderActions, ProviderApiError, ProviderIdentity, type ProviderOptions, type ProviderRow, PullRequest, type PullRequestStatusChange, type PullRequestStatusPlan, type PullRequestStatusReason, type PullRequestStatusUnresolved, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type ReadKeysLimitedInput, type ReconcileChange, type ReconcilePlan, type ReconcileReason, type ReconcileUnresolved, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsDeploy, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RepoVariablesSync, type RequestOptions, type ResolveProjectOptionsResult, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretAccess, SecretScope, SecretVisibility, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, type StackName, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, SyncResult, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenExpectation, type TokenExpectationFilter, type TokenLifetime, type TokenResolver, type TokenRotation, Tooling, ToolingDoctorReport, ToolingExportInput, ToolingExportIssue, ToolingExportResult, ToolingOpenInput, ToolingOpenLaunch, ToolingOpenPlan, ToolingOpenWant, ToolingWorkspaceFile, ToolingWorkspaceInput, ToolingWorkspaceResult, ToolingWorkspaceSide, ToolingWorkspaceState, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, type UnicodeReaction, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiInspection, WikiInstanceState, WikiNavigationState, WikiOrganizationState, WikiProbe, WikiProvisionOpts, WikiProxyConfig, WikiPublishedState, WorkerDeploymentState, WorkerScriptState, Workers, type WorkflowWithConfig, compose, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };
808
+ export { AddedItem, type AgentName, type AgentOptions, Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, type AuthExportOutKind, AuthIdentity, AuthUser, type BoardDeclaration, BoardField, BoardFieldType, BoardItem, BoardItemInput, BoardPullRequest, BoardPullRequestChecks, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, Cache, CacheTokenCheck, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, Coverage, CoverageConfigComponent, CoverageConfigDocumentation, CoverageConfigInput, CoverageExpectations, CoverageNameDiff, CoverageRepoReport, CoverageStatusContext, CoverageStatusInput, CoverageTokenCheck, CoverageUploadFlagResult, CoverageUploadGroup, CoverageUploadInput, CoverageUploadResult, CreateAuthUserInput, Credentials, type CredentialsConfig, CredentialsInspection, type CustomReaction, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, type DeriveProfileInput, type DevConfig, type DevServeConfig, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, type DocsConfig, type DoctorConfig, DuplicateDiscussion, ElevationRequiredError, EmojiCheck, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentEntry, type EnvironmentLayer, EnvironmentReviewer, Environments, Errors, ErrorsInspection, ErrorsOrgState, ErrorsProjectState, type EslintConfig, ExportInfo, type FeatureResolver, type FeatureResolverConfig, type GitHubAppConfig, type HolocronConfig, type HolocronProfile, IdeaRecord, Ideas, type IdeasConfig, ImportOptions, ImportResult, InspectErrorsInput, InspectRelayInput, Issue, IssueClearable, IssueComment, IssueCreateInput, IssueEffort, IssueFields, IssueKind, IssueOrder, IssuePatch, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, IssueUpdateResult, Issues, KNOWN_STACK_DEPS, LabelDef, type LayerTokenExpectation, type LayoutEmoji, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, LogsDataset, type MemberLink, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringDashboardInput, MonitoringDashboardState, MonitoringHeartbeatInput, MonitoringHeartbeatResult, MonitoringHeartbeatUnit, MonitoringHttpMethod, MonitoringStatusComponentInput, MonitoringStatusPageInput, MonitoringStatusPageResult, MonitoringStatusPageState, MoveReport, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsPrsFeed, NotificationsReaction, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type OrgConfig, OrganizationSecretScope, type PackageJsonLike, PagesConfig, ParseWebhookInput, type ParsedReaction, type PermissionRule, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, type ProjectOptions, Projects, type ProviderAction, type ProviderActionContext, type ProviderActions, ProviderApiError, ProviderIdentity, type ProviderOptions, type ProviderRow, PullRequest, PullRequestChecks, PullRequestChecksState, PullRequestFields, PullRequestInput, PullRequestLink, PullRequestPatch, PullRequestResult, type PullRequestStatusChange, type PullRequestStatusPlan, type PullRequestStatusReason, type PullRequestStatusUnresolved, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type ReadKeysLimitedInput, type ReconcileChange, type ReconcilePlan, type ReconcileReason, type ReconcileUnresolved, RelayState, type RepoConfig, type RepoLabels, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsDeploy, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RepoVariablesSync, type RequestOptions, type ResolveProjectOptionsResult, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretAccess, SecretScope, SecretVisibility, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, type StackName, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, SyncResult, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenExpectation, type TokenExpectationFilter, type TokenLifetime, type TokenResolver, type TokenRotation, Tooling, ToolingDoctorReport, ToolingExportInput, ToolingExportIssue, ToolingExportResult, ToolingOpenInput, ToolingOpenLaunch, ToolingOpenPlan, ToolingOpenWant, ToolingWorkspaceFile, ToolingWorkspaceInput, ToolingWorkspaceResult, ToolingWorkspaceSide, ToolingWorkspaceState, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, type UnicodeReaction, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiInspection, WikiInstanceState, WikiNavigationState, WikiOrganizationState, WikiProbe, WikiProvisionOpts, WikiProxyConfig, WikiPublishedState, WorkerDeploymentState, WorkerScriptState, Workers, type WorkflowWithConfig, compose, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CARDINALITY, ElevationRequiredError, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, isMulti } from "./plugin/capabilities.mjs";
2
- import { a as placeAreas, c as ConfigError, d as resolveEntry, f as resolvePluginPackage, g as layerEnvironment, h as isEnvironmentLayer, i as loadConfig, l as credentialsEnvironment, m as ENVIRONMENT_LAYERS, n as compose, o as HOLOCRON_AREAS, p as repoSlug, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-BqX0yRVh.mjs";
2
+ import { a as placeAreas, c as ConfigError, d as resolveEntry, f as resolvePluginPackage, g as layerEnvironment, h as isEnvironmentLayer, i as loadConfig, l as credentialsEnvironment, m as ENVIRONMENT_LAYERS, n as compose, o as HOLOCRON_AREAS, p as repoSlug, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-s8z09jI0.mjs";
3
3
  import { Entry, findCredentials } from "@napi-rs/keyring";
4
4
  import { AuthError, createFeatureResolver as createFeatureResolver$1, createKeyring, createResolveToken as createResolveToken$1, resolveValue } from "@theholocron/kyber/secrets";
5
5
  import { DOCUMENTATION_FLAG, codecovFlagNames, readWorkspacePackages } from "@theholocron/astromech";
@@ -1004,6 +1004,113 @@ const CANONICAL_LABELS = [
1004
1004
  description: "Won't be addressed"
1005
1005
  }
1006
1006
  ];
1007
+ // src/area-labels/area-for-scope/area-for-scope.ts
1008
+ /**
1009
+ * The area a title scope means, by `repo.labels.scopes` (spec `tech-github-area-labels`): `sentinel` gives the area it is
1010
+ * mapped to. The scope is matched without regard to case; a scope the map does not name, or a repo with no map, gives
1011
+ * `undefined`. It is the area's name, not its label: `areaLabelsForTitle()` adds the prefix.
1012
+ */
1013
+ function areaForScope(scope, scopes) {
1014
+ const wanted = scope.trim().toLowerCase();
1015
+ for (const [name, area] of Object.entries(scopes ?? {})) if (name.toLowerCase() === wanted) return area;
1016
+ }
1017
+ // src/area-labels/area-prefix/area-prefix.ts
1018
+ /** The prefix of an area label (spec `tech-github-area-labels`): `area:cli`. */
1019
+ const AREA_PREFIX = "area:";
1020
+ // src/area-labels/area-label-defs/area-label-defs.ts
1021
+ /** The colour of every area label: one family, one colour (spec `tech-github-area-labels`). */
1022
+ const AREA_LABEL_COLOR = "c5def5";
1023
+ /** GitHub refuses a label description longer than this. */
1024
+ const MAX_DESCRIPTION = 100;
1025
+ /**
1026
+ * The labels `holocron setup` makes for the areas a repo declares: `area:<name>`, the one family colour and the
1027
+ * description `Changes under <paths>` from the area's own (not excluded) patterns, cut to GitHub's 100 characters. They
1028
+ * are never part of `CANONICAL_LABELS`: an area names this repo's folders, so another repo has none of them.
1029
+ */
1030
+ function areaLabelDefs(areas) {
1031
+ return Object.entries(areas ?? {}).map(([name, patterns]) => {
1032
+ const text = `Changes under ${patterns.filter((p) => !p.startsWith("!")).join(", ")}`;
1033
+ const description = text.length > MAX_DESCRIPTION ? `${text.slice(0, 99)}…` : text;
1034
+ return {
1035
+ name: `${AREA_PREFIX}${name}`,
1036
+ color: AREA_LABEL_COLOR,
1037
+ description
1038
+ };
1039
+ });
1040
+ }
1041
+ // src/area-labels/path-matches/path-matches.ts
1042
+ /** Turns one glob into the expression a whole path must match: `**` crosses folders, `*` and `?` stay in one. */
1043
+ function globToRegExp(glob) {
1044
+ let out = "";
1045
+ for (let i = 0; i < glob.length; i++) {
1046
+ const c = glob.charAt(i);
1047
+ if (c === "*") {
1048
+ if (glob.charAt(i + 1) === "*") {
1049
+ const slash = glob.charAt(i + 2) === "/";
1050
+ out += slash ? "(?:.*/)?" : ".*";
1051
+ i += slash ? 2 : 1;
1052
+ } else out += "[^/]*";
1053
+ } else if (c === "?") out += "[^/]";
1054
+ else out += c.replace(/[.+^${}()|[\]\\]/g, "\\$&");
1055
+ }
1056
+ return new RegExp(`^${out}$`);
1057
+ }
1058
+ /**
1059
+ * Whether a repository path (forward slashes, from the root) matches one pattern of `repo.labels.areas`. A pattern with
1060
+ * a `*` or `?` is a glob (`cli/**`, `docs/**` then `/*.md`); one without is a file (`turbo.json`) or a folder and
1061
+ * everything under it (`.holocron`, `.holocron/`).
1062
+ */
1063
+ function pathMatches(path, pattern) {
1064
+ const clean = path.replace(/^\.?\//, "");
1065
+ if (/[*?]/.test(pattern)) return globToRegExp(pattern.replace(/^\.?\//, "")).test(clean);
1066
+ const plain = pattern.replace(/^\.?\//, "").replace(/\/+$/, "");
1067
+ return clean === plain || clean.startsWith(`${plain}/`);
1068
+ }
1069
+ // src/area-labels/area-labels-for-files/area-labels-for-files.ts
1070
+ /**
1071
+ * The `area:<name>` labels a set of changed paths earns, in the order the areas are declared (spec
1072
+ * `tech-github-area-labels`). An area's patterns are the ones in `repo.labels.areas`; one starting with `!` takes a path
1073
+ * out of the area (`docs/**` with `!docs/wiki/**`), so a path is in an area when some pattern includes it and none
1074
+ * excludes it. A path in no area earns nothing, which is right, not a failure. This is the one mapping from changed
1075
+ * folders to labels in the CLI; Sentinel's `planAreaLabels()` is meant to agree with it.
1076
+ */
1077
+ function areaLabelsForFiles(files, areas) {
1078
+ const labels = [];
1079
+ for (const [name, patterns] of Object.entries(areas ?? {})) {
1080
+ const include = patterns.filter((p) => !p.startsWith("!"));
1081
+ const exclude = patterns.filter((p) => p.startsWith("!")).map((p) => p.slice(1));
1082
+ if (files.some((file) => include.some((p) => pathMatches(file, p)) && !exclude.some((p) => pathMatches(file, p)))) labels.push(`${AREA_PREFIX}${name}`);
1083
+ }
1084
+ return labels;
1085
+ }
1086
+ // src/area-labels/title-scopes/title-scopes.ts
1087
+ const TITLE = /^\s*[A-Za-z]+(?:\(([^)]*)\))?!?:/;
1088
+ /**
1089
+ * The scopes of a Conventional Commit title: `feat(sentinel): ...` gives `["sentinel"]`, `fix(cli, docs)!: ...` gives
1090
+ * `["cli", "docs"]`. A title with no scope, or that is not in the `type(scope): subject` form, gives none.
1091
+ */
1092
+ function titleScopes(title) {
1093
+ const scope = TITLE.exec(title)?.[1];
1094
+ if (scope === void 0) return [];
1095
+ return scope.split(",").map((s) => s.trim()).filter((s) => s !== "");
1096
+ }
1097
+ // src/area-labels/area-labels-for-title/area-labels-for-title.ts
1098
+ /**
1099
+ * The `area:<name>` labels the scopes of an issue's title earn, through `repo.labels.scopes` (spec
1100
+ * `tech-github-area-labels`): `feat(sentinel): ...` gives `["area:sentinel"]`. An issue has no changed files, so this is
1101
+ * its only source of an area. A title with no scope, or a scope the map does not name, earns nothing; the same area
1102
+ * from two scopes is given once, in the order of the title.
1103
+ */
1104
+ function areaLabelsForTitle(title, scopes) {
1105
+ const labels = [];
1106
+ for (const scope of titleScopes(title)) {
1107
+ const area = areaForScope(scope, scopes);
1108
+ if (area === void 0) continue;
1109
+ const label = `${AREA_PREFIX}${area}`;
1110
+ if (!labels.includes(label)) labels.push(label);
1111
+ }
1112
+ return labels;
1113
+ }
1007
1114
  // src/commands/token-rotation/token-rotation.ts
1008
1115
  /** The rotation policy of a token that declares none: a token is due after 90 days, and an expiry is flagged 14 days ahead. */
1009
1116
  const DEFAULT_TOKEN_ROTATION = {
@@ -1175,4 +1282,4 @@ function resolveCredentialsFile(base, file, makeDir = (dir) => void mkdirSync(di
1175
1282
  isDefault: true
1176
1283
  };
1177
1284
  }
1178
- export { AuthError, BUILTIN_TEMPLATES, CANONICAL_LABELS, CARDINALITY, CUSTOM_EMOJI, ConfigError, ConfigFileError, DEFAULT_TEMPLATES_DIR, DEFAULT_TOKEN_ROTATION, EMOJI_MEDIA_DIR, ElevationRequiredError, HOLOCRON_AREAS, KNOWN_STACK_DEPS, MAX_EMOJI_BYTES, MissingTokenError, PRIVATE_CREDENTIALS_FILE, ProviderApiError, REQUIRED_CAPABILITIES, SHARED_AREAS, WebhookVerificationError, compose, connectionProbe, coverageExpectations, createFeatureResolver, createResolveToken, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, emojiConflictProblem, ignoreAdvice, isMulti, keyring, layoutEmojis, layoutReactions, loadConfig, loadEmojiImage, missingCapabilities, orderKeys, parseReaction, pickByCreation, placeAreas, planPullRequestStatus, planReconcile, reactionProblem, reactionSpelling, readKeysLimited, readLinks, readWorkspacePackageJsons, reportProgress, resolveConfig, resolveCredentialsFile, resolveEntry, resolveEnvironmentId, resolvePluginPackage, resolveProjectOptions, resolveValue, roleTeamProblem, sourceProblem, stdoutKind, syncRoles, tagEmojiProblem, tokenExpectations, tokenRotationRows };
1285
+ export { AREA_LABEL_COLOR, AREA_PREFIX, AuthError, BUILTIN_TEMPLATES, CANONICAL_LABELS, CARDINALITY, CUSTOM_EMOJI, ConfigError, ConfigFileError, DEFAULT_TEMPLATES_DIR, DEFAULT_TOKEN_ROTATION, EMOJI_MEDIA_DIR, ElevationRequiredError, HOLOCRON_AREAS, KNOWN_STACK_DEPS, MAX_EMOJI_BYTES, MissingTokenError, PRIVATE_CREDENTIALS_FILE, ProviderApiError, REQUIRED_CAPABILITIES, SHARED_AREAS, WebhookVerificationError, areaForScope, areaLabelDefs, areaLabelsForFiles, areaLabelsForTitle, compose, connectionProbe, coverageExpectations, createFeatureResolver, createResolveToken, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, emojiConflictProblem, ignoreAdvice, isMulti, keyring, layoutEmojis, layoutReactions, loadConfig, loadEmojiImage, missingCapabilities, orderKeys, parseReaction, pathMatches, pickByCreation, placeAreas, planPullRequestStatus, planReconcile, reactionProblem, reactionSpelling, readKeysLimited, readLinks, readWorkspacePackageJsons, reportProgress, resolveConfig, resolveCredentialsFile, resolveEntry, resolveEnvironmentId, resolvePluginPackage, resolveProjectOptions, resolveValue, roleTeamProblem, sourceProblem, stdoutKind, syncRoles, tagEmojiProblem, titleScopes, tokenExpectations, tokenRotationRows };