@theholocron/cli 5.0.0-alpha.337 → 5.0.0-alpha.339

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.
@@ -1,4 +1,4 @@
1
- import { g as CapabilityKey, sn as TeamEntry, zt as PagesConfig } from "./index-KMWrNLpJ.mjs";
1
+ import { D as CapabilityKey, Qt as PagesConfig, xn as TeamEntry } from "./index-XBpiD6Sx.mjs";
2
2
  import { DocsCoverageMode } from "@theholocron/astromech";
3
3
  import { LogLevel } from "@theholocron/observability/core";
4
4
  /** Structured-logging config. The Axiom **token** never lives here — only in
@@ -11,7 +11,7 @@ import { ProviderApiError } from "@theholocron/http-client";
11
11
  * See `docs/wiki/specifications/tech-architecture.spec.md` for the design narrative
12
12
  * (issue: #74).
13
13
  */
14
- type CapabilityKey = "source" | "ci" | "secrets" | "environments" | "issues" | "deployment" | "storage" | "auth" | "vault" | "dns" | "tooling" | "notifications" | "analytics" | "errors" | "logs" | "monitoring" | "wiki" | "workers" | "tunnels" | "credentials";
14
+ type CapabilityKey = "source" | "ci" | "secrets" | "environments" | "issues" | "deployment" | "storage" | "auth" | "vault" | "dns" | "tooling" | "notifications" | "analytics" | "errors" | "logs" | "monitoring" | "wiki" | "workers" | "tunnels" | "credentials" | "projects";
15
15
  /** How many providers a capability resolves to: one (`"single"`) or several at once (`"many"`). */
16
16
  type Cardinality = "single" | "many";
17
17
  /** What every capability implementation carries: which capability it is and which provider backs it. */
@@ -2287,6 +2287,197 @@ interface CredentialsInspection {
2287
2287
  /** The names of its variables, never their values. */
2288
2288
  names: string[];
2289
2289
  }
2290
+ /**
2291
+ * What a status means, whatever the board calls it. A provider maps a category to its own states (Jira groups
2292
+ * statuses into To Do, In Progress and Done), and the doctor, `reconcile` and `move` read the category, so "closed and
2293
+ * not done" never depends on an option being spelled `Done`. It is not the `issues` capability's {@link StatusCategory}: a board
2294
+ * tells a backlog idea from planned work and shows a blocked item, which an issue's own status does not.
2295
+ */
2296
+ type BoardStatusCategory = "backlog" | "planned" | "active" | "blocked" | "done";
2297
+ /** One status a board offers, with the category that says what it means. */
2298
+ interface BoardStatus {
2299
+ /** The status as the board shows it, e.g. `In Progress`. */
2300
+ name: string;
2301
+ /** What the status means. */
2302
+ category: BoardStatusCategory;
2303
+ /** A colour name for the status, e.g. `GRAY`. A provider without colours ignores it. */
2304
+ color?: string;
2305
+ /** A line saying when to use the status. */
2306
+ description?: string;
2307
+ }
2308
+ /** The kinds of field a board can hold besides its status. */
2309
+ type BoardFieldType = "single_select" | "text" | "number" | "date" | "iteration";
2310
+ /** A field of a board besides its status. */
2311
+ interface BoardField {
2312
+ /** The field's name, e.g. `Priority`. */
2313
+ name: string;
2314
+ /** What the field holds. */
2315
+ type: BoardFieldType;
2316
+ /** The choices of a `single_select` field, in order. */
2317
+ options?: string[];
2318
+ }
2319
+ /** A saved way of looking at a board. */
2320
+ interface BoardView {
2321
+ /** The view's name, shown on its tab. */
2322
+ name: string;
2323
+ /** `board` is columns by status, `table` is rows. */
2324
+ layout: "board" | "table";
2325
+ /** A filter expression in the provider's syntax, e.g. `-status:Done`. */
2326
+ filter?: string;
2327
+ /** The name of a field to group by. */
2328
+ groupBy?: string;
2329
+ /** Whether this view opens first. The first view wins when several are set. */
2330
+ default?: boolean;
2331
+ }
2332
+ /**
2333
+ * What a board should look like, whole: the resolved form of a template. `setup` applies it, `doctor project` compares
2334
+ * it with the live board and `create` makes a board from it.
2335
+ */
2336
+ interface BoardTemplate {
2337
+ /** The template's name, e.g. `roadmap`. */
2338
+ name: string;
2339
+ /** The statuses, in the order the board shows them. */
2340
+ statuses: BoardStatus[];
2341
+ /** The other fields. */
2342
+ fields: BoardField[];
2343
+ /** The views. */
2344
+ views: BoardView[];
2345
+ /** The automation rules that should be on, as the provider names them. A provider that cannot create one reports it. */
2346
+ rules?: string[];
2347
+ /** A board to copy when this one is created, which carries its automation rules. A provider without a copy ignores it. */
2348
+ source?: string;
2349
+ }
2350
+ /**
2351
+ * What a template file holds. With `extends` it names a template to start from and adds to it; without, it is a whole
2352
+ * template and the three lists are required. `resolveTemplate()` turns one into a {@link BoardTemplate}.
2353
+ */
2354
+ interface BoardTemplateFile {
2355
+ /** The template's name. Defaults to the file's name. */
2356
+ name?: string;
2357
+ /** A template to inherit the statuses, fields, views and rules of. */
2358
+ extends?: string;
2359
+ /** The statuses; with `extends`, added to the inherited ones. */
2360
+ statuses?: BoardStatus[];
2361
+ /** The fields; with `extends`, added to the inherited ones. */
2362
+ fields?: BoardField[];
2363
+ /** The views; with `extends`, added to the inherited ones. */
2364
+ views?: BoardView[];
2365
+ /** The automation rules that should be on. */
2366
+ rules?: string[];
2367
+ /** A board to copy when this one is created. */
2368
+ source?: string;
2369
+ }
2370
+ /** A board as `list` and `find` return it. */
2371
+ interface BoardSummary {
2372
+ /** The provider's id for the board. Opaque: only the provider reads it. */
2373
+ id: string;
2374
+ /** The board's number where the provider has one (a GitHub project). */
2375
+ number?: number;
2376
+ /** The board's name, which is how it is found. */
2377
+ name: string;
2378
+ /** Where to open it. */
2379
+ url: string;
2380
+ /** Whether the board is closed. */
2381
+ closed: boolean;
2382
+ }
2383
+ /** An automation rule of a board and whether it is on. */
2384
+ interface BoardRule {
2385
+ /** The rule's name as the provider spells it. */
2386
+ name: string;
2387
+ /** Whether it is on. */
2388
+ enabled: boolean;
2389
+ }
2390
+ /** The live board, read for `setup` to compare with a template and for `doctor project`. */
2391
+ interface BoardState {
2392
+ /** The board. */
2393
+ board: BoardSummary;
2394
+ /** The status names, in order. */
2395
+ statuses: string[];
2396
+ /** The other fields, in order. */
2397
+ fields: BoardField[];
2398
+ /** The views. */
2399
+ views: BoardView[];
2400
+ /** The automation rules. */
2401
+ rules: BoardRule[];
2402
+ }
2403
+ /** One item of a board: an issue or a pull request, named by its `issues` key. */
2404
+ interface BoardItem {
2405
+ /** The item's key, the one the `issues` capability uses (`#42`, or `owner/repo#42` from another repository). */
2406
+ key: string;
2407
+ /** The item's title. */
2408
+ title: string;
2409
+ /** Whether the issue or pull request is open. Closed and merged ones are not. */
2410
+ open: boolean;
2411
+ /** The item's status, or undefined when it has none. */
2412
+ status?: string;
2413
+ /** The category of that status, when the template knows it. */
2414
+ category?: BoardStatusCategory;
2415
+ /** The keys of the open issues this one is blocked by. */
2416
+ blockedBy: string[];
2417
+ }
2418
+ /** What {@link Projects.ensure} did to bring a board in line with a template. */
2419
+ interface EnsureReport {
2420
+ /** Whether the board did not exist and was made. */
2421
+ created: boolean;
2422
+ /** What was changed, one line each, e.g. `status Blocked added`. */
2423
+ changes: string[];
2424
+ /** What the provider cannot do and a person must, one line each, e.g. `turn on the rule "Item closed"`. */
2425
+ todos: string[];
2426
+ }
2427
+ /** What {@link Projects.move} did between two boards. */
2428
+ interface MoveReport {
2429
+ /** Keys of the open items put on the target board. */
2430
+ moved: string[];
2431
+ /** Keys of the open items that were already on the target and kept its values. */
2432
+ kept: string[];
2433
+ /** Keys of closed items left on the source, with the status they were set to where it was wrong. */
2434
+ left: string[];
2435
+ }
2436
+ /**
2437
+ * Project management: boards that plan work, in a vocabulary no tracker owns (board, item, status with a category,
2438
+ * blocker, rule, template). `issues` is one issue; `projects` is the surface that holds them. A GitHub project, a Jira
2439
+ * board or a Linear view is one provider, so a change of tracker is a provider entry and a plugin and nothing else.
2440
+ *
2441
+ * `owner` is whoever the boards belong to: a GitHub organization, a Jira site. A board is found by its name among the
2442
+ * open boards, and an item is an `issues` key, so nothing here knows what a node id is.
2443
+ */
2444
+ interface Projects extends ProviderIdentity {
2445
+ /** Identifies this provider as the `projects` capability. */
2446
+ readonly key: "projects";
2447
+ /** Every board of the owner, open and closed. */
2448
+ list(owner: string): Promise<BoardSummary[]>;
2449
+ /** The open board with exactly this name, or undefined. */
2450
+ find(owner: string, name: string): Promise<BoardSummary | undefined>;
2451
+ /** Make a board from the template (copying `template.source` where the provider can) and return it. */
2452
+ create(owner: string, name: string, template: BoardTemplate): Promise<BoardSummary>;
2453
+ /** Close a board. Reversible. */
2454
+ close(owner: string, board: BoardSummary): Promise<void>;
2455
+ /** The live board, for `setup` to diff and `doctor project` to compare. */
2456
+ read(owner: string, board: BoardSummary): Promise<BoardState>;
2457
+ /**
2458
+ * Bring the board in line with the template and report what changed and what only a person can do. Never deletes a
2459
+ * field, option or view the template does not mention, and never clears an item's value. Optional: a provider may
2460
+ * only list and close.
2461
+ */
2462
+ ensure?(owner: string, board: BoardSummary, template: BoardTemplate): Promise<EnsureReport>;
2463
+ /** The board's items with their status, whether their issue is open and their open blockers. Optional. */
2464
+ items?(owner: string, board: BoardSummary, template: BoardTemplate): Promise<BoardItem[]>;
2465
+ /**
2466
+ * Put an item in a status. Idempotent: `transitioned` is false when it is already there. A provider that works
2467
+ * through a workflow (Jira) can refuse, and says why in `via`. Optional.
2468
+ */
2469
+ setStatus?(owner: string, board: BoardSummary, key: string, status: string): Promise<LifecycleResult>;
2470
+ /**
2471
+ * Put the open items of one board on another, with their status and priority; leave closed ones behind. An item
2472
+ * already on the target keeps its values. Optional.
2473
+ */
2474
+ move?(owner: string, from: BoardSummary, to: BoardSummary, template: BoardTemplate): Promise<MoveReport>;
2475
+ /** A `holocron doctor` smoke check: reports how many boards the token can see. */
2476
+ whoami?(): Promise<{
2477
+ ok: boolean;
2478
+ boards: number;
2479
+ }>;
2480
+ }
2290
2481
  /** Maps each capability key to the interface its provider implements. */
2291
2482
  interface CapabilityImpls {
2292
2483
  /** The `source` provider. */
@@ -2329,6 +2520,8 @@ interface CapabilityImpls {
2329
2520
  tunnels: Tunnels;
2330
2521
  /** The `credentials` providers. */
2331
2522
  credentials: Credentials;
2523
+ /** The `projects` provider. */
2524
+ projects: Projects;
2332
2525
  }
2333
2526
  /** The cardinality (`"single"` or `"many"`) of the capability `K`. */
2334
2527
  type CardinalityFor<K extends CapabilityKey> = (typeof CARDINALITY)[K];
@@ -2374,6 +2567,8 @@ declare const CARDINALITY: {
2374
2567
  readonly workers: "single";
2375
2568
  /** `tunnels` has exactly one provider. */
2376
2569
  readonly tunnels: "single";
2570
+ /** `projects` has exactly one provider. */
2571
+ readonly projects: "single";
2377
2572
  /** `credentials` can have several providers, tried in order. */
2378
2573
  readonly credentials: "many";
2379
2574
  };
@@ -2437,4 +2632,4 @@ declare class WebhookVerificationError extends Error {
2437
2632
  }
2438
2633
  /** Whether `key` is a capability that can have several providers active at once. */
2439
2634
  declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
2440
- export { Environments as $, SourceFile as $t, DeployScriptResult as A, NotificationsMember as At, DnsRecord as B, ParseWebhookInput as Bt, ConnectionStringOptions as C, NotificationsApplicationLayout as Ct, DeployFunctionConfig as D, NotificationsForumTag as Dt, CredentialsInspection as E, NotificationsEveryoneLayout as Et, DeploymentTarget as F, NotificationsServerLayout as Ft, EnsureRelayResult as G, RepoSettings as Gt, DnsRecordType as H, PullRequest as Ht, DeploymentTrigger as I, NotificationsSignIn as It, EnsuredDiscussion as J, SecretScope as Jt, EnsureResult as K, ResolvedCapability as Kt, DiscussionPatch as L, NotificationsSignedIn as Lt, DeploymentProject as M, NotificationsOnboardingLayout as Mt, DeploymentProjectSettings as N, NotificationsPicture as Nt, DeployFunctionResult as O, NotificationsLayout as Ot, DeploymentRecord as P, NotificationsPinnedLayout as Pt, EnvironmentReviewer as Q, SourceBranch as Qt, DiscussionPost as R, NotificationsWelcomeLayout as Rt, CiRunStatus as S, NotificationsAccess as St, Credentials as T, NotificationsDelivery as Tt, EnsureDiscussionInput as U, RelayState as Ut, DnsRecordRequest as V, ProviderIdentity as Vt, EnsureRelayInput as W, RepoRef as Wt, EnsuredTunnel as X, ServerInspection as Xt, EnsuredResource as Y, Secrets as Yt, Environment as Z, Source as Zt, Cardinality as _, Wiki as _n, MonitoringCheck as _t, REQUIRED_CAPABILITIES as a, Storage as an, LabelDef as at, CiRun as b, WorkerScriptState as bn, NormalizedAuthUser as bt, Analytics as c, TeamPermission as cn, Logs as ct, AuthEvent as d, TrackerDoctorReport as dn, MonitoringAlertChannelResult as dt, SourceRepoInfo as en, Errors as et, AuthEventType as f, TrackerUser as fn, MonitoringAlertChannelState as ft, CapabilityKey as g, WebhookDashboardInfo as gn, MonitoringAssertionSource as gt, CapabilityImpls as h, Vault as hn, MonitoringAssertionComparison as ht, ProviderApiError as i, StatusCategory as in, Issues as it, Deployment as j, NotificationsMonitoringFeed as jt, DeployScriptConfig as k, NotificationsLinksLayout as kt, Auth as l, Tooling as ln, Monitoring as lt, AuthUser as m, Tunnels as mn, MonitoringAssertion as mt, ElevationRequiredError as n, SourceSecurity as nn, Issue as nt, WebhookVerificationError as o, StorageBranch as on, LifecycleResult as ot, AuthIdentity as p, TunnelRoute as pn, MonitoringAlertSettings as pt, EnsureWebhookResult as q, Ruleset as qt, MissingTokenError as r, SourceTeamMember as rn, IssueSearchFilter as rt, isMulti as s, TeamEntry as sn, LifecycleSlot as st, CARDINALITY as t, SourceRulesetDetail as tn, InspectRelayInput as tt, AuthDescription as u, ToolingDoctorReport as un, MonitoringAlertChannelInput as ut, CardinalityFor as v, WikiProvisionOpts as vn, MonitoringCheckInput as vt, CreateAuthUserInput as w, NotificationsChannelLayout as wt, CiRunFilter as x, Workers as xn, Notifications as xt, Ci as y, WikiProxyConfig as yn, MonitoringHttpMethod as yt, Dns as z, PagesConfig as zt };
2635
+ export { DnsRecordType as $, ParseWebhookInput as $t, Ci as A, WebhookDashboardInfo as An, MonitoringCheckInput as At, DeployScriptConfig as B, NotificationsForumTag as Bt, BoardTemplate as C, Tooling as Cn, MonitoringAlertChannelResult as Ct, CapabilityKey as D, TunnelRoute as Dn, MonitoringAssertionComparison as Dt, CapabilityImpls as E, TrackerUser as En, MonitoringAssertion as Et, CreateAuthUserInput as F, Workers as Fn, NotificationsAccess as Ft, DeploymentRecord as G, NotificationsOnboardingLayout as Gt, Deployment as H, NotificationsLinksLayout as Ht, Credentials as I, NotificationsApplicationLayout as It, DiscussionPatch as J, NotificationsServerLayout as Jt, DeploymentTarget as K, NotificationsPicture as Kt, CredentialsInspection as L, NotificationsChannelLayout as Lt, CiRunFilter as M, WikiProvisionOpts as Mn, MoveReport as Mt, CiRunStatus as N, WikiProxyConfig as Nn, NormalizedAuthUser as Nt, Cardinality as O, Tunnels as On, MonitoringAssertionSource as Ot, ConnectionStringOptions as P, WorkerScriptState as Pn, Notifications as Pt, DnsRecordRequest as Q, PagesConfig as Qt, DeployFunctionConfig as R, NotificationsDelivery as Rt, BoardSummary as S, TeamPermission as Sn, MonitoringAlertChannelInput as St, BoardView as T, TrackerDoctorReport as Tn, MonitoringAlertSettings as Tt, DeploymentProject as U, NotificationsMember as Ut, DeployScriptResult as V, NotificationsLayout as Vt, DeploymentProjectSettings as W, NotificationsMonitoringFeed as Wt, Dns as X, NotificationsSignedIn as Xt, DiscussionPost as Y, NotificationsSignIn as Yt, DnsRecord as Z, NotificationsWelcomeLayout as Zt, BoardItem as _, SourceTeamMember as _n, LabelDef as _t, REQUIRED_CAPABILITIES as a, RepoSettings as an, EnsureWebhookResult as at, BoardStatus as b, StorageBranch as bn, Logs as bt, Analytics as c, SecretScope as cn, EnsuredTunnel as ct, AuthEvent as d, Source as dn, Environments as dt, Projects as en, EnsureDiscussionInput as et, AuthEventType as f, SourceBranch as fn, Errors as ft, BoardFieldType as g, SourceSecurity as gn, Issues as gt, BoardField as h, SourceRulesetDetail as hn, IssueSearchFilter as ht, ProviderApiError as i, RepoRef as in, EnsureResult as it, CiRun as j, Wiki as jn, MonitoringHttpMethod as jt, CardinalityFor as k, Vault as kn, MonitoringCheck as kt, Auth as l, Secrets as ln, Environment as lt, AuthUser as m, SourceRepoInfo as mn, Issue as mt, ElevationRequiredError as n, PullRequest as nn, EnsureRelayResult as nt, WebhookVerificationError as o, ResolvedCapability as on, EnsuredDiscussion as ot, AuthIdentity as p, SourceFile as pn, InspectRelayInput as pt, DeploymentTrigger as q, NotificationsPinnedLayout as qt, MissingTokenError as r, RelayState as rn, EnsureReport as rt, isMulti as s, Ruleset as sn, EnsuredResource as st, CARDINALITY as t, ProviderIdentity as tn, EnsureRelayInput as tt, AuthDescription as u, ServerInspection as un, EnvironmentReviewer as ut, BoardRule as v, StatusCategory as vn, LifecycleResult as vt, BoardTemplateFile as w, ToolingDoctorReport as wn, MonitoringAlertChannelState as wt, BoardStatusCategory as x, TeamEntry as xn, Monitoring as xt, BoardState as y, Storage as yn, LifecycleSlot as yt, DeployFunctionResult as z, NotificationsEveryoneLayout as zt };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as Environments, $t as SourceFile, A as DeployScriptResult, At as NotificationsMember, B as DnsRecord, Bt as ParseWebhookInput, C as ConnectionStringOptions, Ct as NotificationsApplicationLayout, D as DeployFunctionConfig, Dt as NotificationsForumTag, E as CredentialsInspection, Et as NotificationsEveryoneLayout, F as DeploymentTarget, Ft as NotificationsServerLayout, G as EnsureRelayResult, Gt as RepoSettings, H as DnsRecordType, Ht as PullRequest, I as DeploymentTrigger, It as NotificationsSignIn, J as EnsuredDiscussion, Jt as SecretScope, K as EnsureResult, Kt as ResolvedCapability, L as DiscussionPatch, Lt as NotificationsSignedIn, M as DeploymentProject, Mt as NotificationsOnboardingLayout, N as DeploymentProjectSettings, Nt as NotificationsPicture, O as DeployFunctionResult, Ot as NotificationsLayout, P as DeploymentRecord, Pt as NotificationsPinnedLayout, Q as EnvironmentReviewer, Qt as SourceBranch, R as DiscussionPost, Rt as NotificationsWelcomeLayout, S as CiRunStatus, St as NotificationsAccess, T as Credentials, Tt as NotificationsDelivery, U as EnsureDiscussionInput, Ut as RelayState, V as DnsRecordRequest, Vt as ProviderIdentity, W as EnsureRelayInput, Wt as RepoRef, X as EnsuredTunnel, Xt as ServerInspection, Y as EnsuredResource, Yt as Secrets, Z as Environment, Zt as Source, _ as Cardinality, _n as Wiki, _t as MonitoringCheck, a as REQUIRED_CAPABILITIES, an as Storage, at as LabelDef, b as CiRun, bn as WorkerScriptState, bt as NormalizedAuthUser, c as Analytics, cn as TeamPermission, ct as Logs, d as AuthEvent, dn as TrackerDoctorReport, dt as MonitoringAlertChannelResult, en as SourceRepoInfo, et as Errors, f as AuthEventType, fn as TrackerUser, ft as MonitoringAlertChannelState, g as CapabilityKey, gn as WebhookDashboardInfo, gt as MonitoringAssertionSource, h as CapabilityImpls, hn as Vault, ht as MonitoringAssertionComparison, i as ProviderApiError, in as StatusCategory, it as Issues, j as Deployment, jt as NotificationsMonitoringFeed, k as DeployScriptConfig, kt as NotificationsLinksLayout, l as Auth, ln as Tooling, lt as Monitoring, m as AuthUser, mn as Tunnels, mt as MonitoringAssertion, n as ElevationRequiredError, nn as SourceSecurity, nt as Issue, o as WebhookVerificationError, on as StorageBranch, ot as LifecycleResult, p as AuthIdentity, pn as TunnelRoute, pt as MonitoringAlertSettings, q as EnsureWebhookResult, qt as Ruleset, r as MissingTokenError, rn as SourceTeamMember, rt as IssueSearchFilter, s as isMulti, sn as TeamEntry, st as LifecycleSlot, t as CARDINALITY, tn as SourceRulesetDetail, tt as InspectRelayInput, u as AuthDescription, un as ToolingDoctorReport, ut as MonitoringAlertChannelInput, v as CardinalityFor, vn as WikiProvisionOpts, vt as MonitoringCheckInput, w as CreateAuthUserInput, wt as NotificationsChannelLayout, x as CiRunFilter, xn as Workers, xt as Notifications, y as Ci, yn as WikiProxyConfig, yt as MonitoringHttpMethod, z as Dns, zt as PagesConfig } from "./index-KMWrNLpJ.mjs";
2
- import { A as RepoSecretsSync, B as TelemetryConfig, C as ProviderOptions, D as RepoProperties, E as RepoConfig, F as ResolvedProvidersConfig, I as ResolvedTuple, L as SingleEntry, M as RepoVariables, N as ResolvedHolocronConfig, O as RepoProtection, P as ResolvedProviderEntry, R as StorybookDeployProject, S as MultiEntry, T as RawProvidersConfig, V as WorkflowWithConfig, _ as DoctorConfig, a as ConfigError, b as HolocronConfig, c as resolveEntry, d as CapabilityConfigPackage, f as ChromaticProjectConfig, g as DocsConfig, h as DevServeConfig, i as TaskEntry, j as RepoValidationConfig, k as RepoSecrets, l as resolvePluginPackage, m as DevConfig, n as Capability, o as credentialsEnvironment, p as CredentialsConfig, r as ComposedPreset, s as resolveConfig, t as compose, u as AppConfig, v as EnvConfig, w as RawProviderEntry, x as LogConfig, y as EslintConfig, z as TaskEntryConfig } from "./index-CsLdvk4-.mjs";
1
+ import { $ as DnsRecordType, $t as ParseWebhookInput, A as Ci, An as WebhookDashboardInfo, At as MonitoringCheckInput, B as DeployScriptConfig, Bt as NotificationsForumTag, C as BoardTemplate, Cn as Tooling, Ct as MonitoringAlertChannelResult, D as CapabilityKey, Dn as TunnelRoute, Dt as MonitoringAssertionComparison, E as CapabilityImpls, En as TrackerUser, Et as MonitoringAssertion, F as CreateAuthUserInput, Fn as Workers, Ft as NotificationsAccess, G as DeploymentRecord, Gt as NotificationsOnboardingLayout, H as Deployment, Ht as NotificationsLinksLayout, I as Credentials, It as NotificationsApplicationLayout, J as DiscussionPatch, Jt as NotificationsServerLayout, K as DeploymentTarget, Kt as NotificationsPicture, L as CredentialsInspection, Lt as NotificationsChannelLayout, M as CiRunFilter, Mn as WikiProvisionOpts, Mt as MoveReport, N as CiRunStatus, Nn as WikiProxyConfig, Nt as NormalizedAuthUser, O as Cardinality, On as Tunnels, Ot as MonitoringAssertionSource, P as ConnectionStringOptions, Pn as WorkerScriptState, Pt as Notifications, Q as DnsRecordRequest, Qt as PagesConfig, R as DeployFunctionConfig, Rt as NotificationsDelivery, S as BoardSummary, Sn as TeamPermission, St as MonitoringAlertChannelInput, T as BoardView, Tn as TrackerDoctorReport, Tt as MonitoringAlertSettings, U as DeploymentProject, Ut as NotificationsMember, V as DeployScriptResult, Vt as NotificationsLayout, W as DeploymentProjectSettings, Wt as NotificationsMonitoringFeed, X as Dns, Xt as NotificationsSignedIn, Y as DiscussionPost, Yt as NotificationsSignIn, Z as DnsRecord, Zt as NotificationsWelcomeLayout, _ as BoardItem, _n as SourceTeamMember, _t as LabelDef, a as REQUIRED_CAPABILITIES, an as RepoSettings, at as EnsureWebhookResult, b as BoardStatus, bn as StorageBranch, bt as Logs, c as Analytics, cn as SecretScope, ct as EnsuredTunnel, d as AuthEvent, dn as Source, dt as Environments, en as Projects, et as EnsureDiscussionInput, f as AuthEventType, fn as SourceBranch, ft as Errors, g as BoardFieldType, gn as SourceSecurity, gt as Issues, h as BoardField, hn as SourceRulesetDetail, ht as IssueSearchFilter, i as ProviderApiError, in as RepoRef, it as EnsureResult, j as CiRun, jn as Wiki, jt as MonitoringHttpMethod, k as CardinalityFor, kn as Vault, kt as MonitoringCheck, l as Auth, ln as Secrets, lt as Environment, m as AuthUser, mn as SourceRepoInfo, mt as Issue, n as ElevationRequiredError, nn as PullRequest, nt as EnsureRelayResult, o as WebhookVerificationError, on as ResolvedCapability, ot as EnsuredDiscussion, p as AuthIdentity, pn as SourceFile, pt as InspectRelayInput, q as DeploymentTrigger, qt as NotificationsPinnedLayout, r as MissingTokenError, rn as RelayState, rt as EnsureReport, s as isMulti, sn as Ruleset, st as EnsuredResource, t as CARDINALITY, tn as ProviderIdentity, tt as EnsureRelayInput, u as AuthDescription, un as ServerInspection, ut as EnvironmentReviewer, v as BoardRule, vn as StatusCategory, vt as LifecycleResult, w as BoardTemplateFile, wn as ToolingDoctorReport, wt as MonitoringAlertChannelState, x as BoardStatusCategory, xn as TeamEntry, xt as Monitoring, y as BoardState, yn as Storage, yt as LifecycleSlot, z as DeployFunctionResult, zt as NotificationsEveryoneLayout } from "./index-XBpiD6Sx.mjs";
2
+ import { A as RepoSecretsSync, B as TelemetryConfig, C as ProviderOptions, D as RepoProperties, E as RepoConfig, F as ResolvedProvidersConfig, I as ResolvedTuple, L as SingleEntry, M as RepoVariables, N as ResolvedHolocronConfig, O as RepoProtection, P as ResolvedProviderEntry, R as StorybookDeployProject, S as MultiEntry, T as RawProvidersConfig, V as WorkflowWithConfig, _ as DoctorConfig, a as ConfigError, b as HolocronConfig, c as resolveEntry, d as CapabilityConfigPackage, f as ChromaticProjectConfig, g as DocsConfig, h as DevServeConfig, i as TaskEntry, j as RepoValidationConfig, k as RepoSecrets, l as resolvePluginPackage, m as DevConfig, n as Capability, o as credentialsEnvironment, p as CredentialsConfig, r as ComposedPreset, s as resolveConfig, t as compose, u as AppConfig, v as EnvConfig, w as RawProviderEntry, x as LogConfig, y as EslintConfig, z as TaskEntryConfig } from "./index-D9taYHzW.mjs";
3
3
  import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
4
4
  import { PackageJson } from "@theholocron/pkg-utils";
5
5
  import { WorkspacePackage } from "@theholocron/astromech";
@@ -376,4 +376,4 @@ export declare function missingCapabilities(capabilities: readonly string[]): st
376
376
  * own soft-fail behavior.
377
377
  */
378
378
  export declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
379
- export { Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Credentials, type CredentialsConfig, CredentialsInspection, 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, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolver, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, InspectRelayInput, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, type MemberLink, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenResolver, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, WorkerScriptState, Workers, type WorkflowWithConfig, compose, createRestClient, credentialsEnvironment, isMulti, resolveConfig, resolveEntry, resolvePluginPackage };
379
+ export { Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Credentials, type CredentialsConfig, CredentialsInspection, 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, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolver, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, InspectRelayInput, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, type MemberLink, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, MoveReport, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, Projects, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenResolver, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, WorkerScriptState, Workers, type WorkflowWithConfig, compose, createRestClient, credentialsEnvironment, isMulti, resolveConfig, resolveEntry, resolvePluginPackage };
package/dist/index.mjs CHANGED
@@ -1,129 +1,42 @@
1
1
  import { CARDINALITY, ElevationRequiredError, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, isMulti } from "./plugin/capabilities.mjs";
2
2
  import { a as resolveEntry, i as resolveConfig, n as ConfigError, o as resolvePluginPackage, r as credentialsEnvironment, t as compose } from "./compose-DU_NeIR0.mjs";
3
- import { createRequire } from "node:module";
4
- import { AuthError, createResolveToken as createResolveToken$1, createRestClient } from "@theholocron/http-client";
5
- import { basename, dirname, join } from "node:path";
6
- import "dotenv";
3
+ import { AuthError, createResolveToken as createResolveToken$1, createRestClient, onRetry } from "@theholocron/http-client";
4
+ import { createKeyring, getCredential } from "@theholocron/kyber/secrets";
7
5
  import { createEnvLookup, withEnvPrefix } from "@theholocron/env-utils/lookup";
8
6
  import { Entry, findCredentials } from "@napi-rs/keyring";
9
7
  import { errorMessage } from "@theholocron/misc-utils";
10
- import chalk from "chalk";
11
- import "ora";
8
+ import { createProgress, progressEnabled, withProgress } from "@theholocron/kyber/ui";
12
9
  import { lookup } from "node:dns/promises";
10
+ import { basename, dirname, join } from "node:path";
13
11
  import { readPackageJson } from "@theholocron/pkg-utils";
14
12
  import { loadTasksConfig } from "@theholocron/astromech/config";
15
13
  import { ConfigFileError, ConfigFileError as ConfigFileError$1, loadConfigFile } from "@theholocron/datapad";
16
14
  import { readGitRemote } from "@theholocron/git-utils";
17
- // ../kyber/dist/secrets.mjs
18
- /**
19
- * The variables the `credentials` providers returned, kept for the life of the process.
20
- *
21
- * The plugin loader reads each provider once (`setCredentials`), and the token resolvers look a token up here
22
- * (`getCredential`) after the flag and the process environment and before the keyring. It is in memory only: the
23
- * values were already in this process when the provider returned them, and nothing here writes them anywhere.
24
- *
25
- * A source is one provider's answer for one environment. They are kept in the order they were set, which is the
26
- * order `holocron.config` lists the providers, and the first source that has a value wins.
27
- */
28
- const sources = /* @__PURE__ */ new Map();
29
- /**
30
- * The first non-empty value for any of `names`, from the first source that has one. Sources are tried in the order
31
- * they were set; within a source the names are tried in the order given (the project's own variable name before the
32
- * vendor's). `undefined` when no source has one.
33
- */
34
- function getCredential(...names) {
35
- for (const variables of sources.values()) for (const name of names) {
36
- const value = variables[name];
37
- if (value) return value;
38
- }
39
- }
40
- function loadBinding() {
41
- try {
42
- return createRequire(import.meta.url)("@napi-rs/keyring");
43
- } catch {
44
- return null;
15
+ // \0rolldown/runtime.js
16
+ var __defProp = Object.defineProperty;
17
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
18
+ var __getOwnPropNames = Object.getOwnPropertyNames;
19
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
20
+ var __exportAll = (all, no_symbols) => {
21
+ let target = {};
22
+ for (var name in all) __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true
25
+ });
26
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
27
+ return target;
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
31
+ key = keys[i];
32
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
33
+ get: ((k) => from[k]).bind(null, key),
34
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
35
+ });
45
36
  }
46
- }
47
- /**
48
- * A tool's secrets in the OS keyring, under one service name.
49
- *
50
- * Keyring access is best-effort. Platforms without a supported credential store (some Linux CI images, sandboxed
51
- * environments) throw from the underlying library, and `@napi-rs/keyring` is an optional peer that may not be installed
52
- * at all. Every method catches that and answers `null`, `false` or an empty list rather than propagating, so a caller's
53
- * chain (a flag, then the environment, then the keyring) falls through to the paths that do work, which is how CI is
54
- * meant to run.
55
- *
56
- * Reads are remembered in memory only, for the life of the process. A cache that outlived the process would mean writing
57
- * secrets somewhere else, which is what the keyring is there to avoid.
58
- */
59
- function createKeyring(options) {
60
- const { service } = options;
61
- const cache = /* @__PURE__ */ new Map();
62
- let binding = options.binding;
63
- const loaded = () => {
64
- if (binding === void 0) binding = loadBinding();
65
- return binding;
66
- };
67
- const entry = (account) => {
68
- const b = loaded();
69
- if (!b) throw new Error("no OS keyring available");
70
- return new b.Entry(service, account);
71
- };
72
- return {
73
- get(account) {
74
- if (cache.has(account)) return cache.get(account);
75
- let secret;
76
- try {
77
- secret = entry(account).getPassword();
78
- } catch {
79
- secret = null;
80
- }
81
- cache.set(account, secret);
82
- return secret;
83
- },
84
- set(account, secret) {
85
- try {
86
- entry(account).setPassword(secret);
87
- cache.set(account, secret);
88
- return true;
89
- } catch {
90
- cache.delete(account);
91
- return false;
92
- }
93
- },
94
- delete(account) {
95
- try {
96
- const removed = entry(account).deletePassword();
97
- cache.set(account, null);
98
- return removed;
99
- } catch {
100
- cache.delete(account);
101
- return false;
102
- }
103
- },
104
- list() {
105
- try {
106
- const b = loaded();
107
- return b ? b.findCredentials(service).map((c) => c.account) : [];
108
- } catch {
109
- return [];
110
- }
111
- },
112
- isAvailable() {
113
- try {
114
- const b = loaded();
115
- if (!b) return false;
116
- b.findCredentials(service);
117
- return true;
118
- } catch {
119
- return false;
120
- }
121
- },
122
- clearCache() {
123
- cache.clear();
124
- }
125
- };
126
- }
37
+ return to;
38
+ };
39
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
127
40
  // src/env/env.ts
128
41
  /** Singleton env for simple global lookups throughout the CLI. */
129
42
  const env = createEnvLookup();
@@ -222,26 +135,28 @@ function createFeatureResolver(config) {
222
135
  keyringKey: config.keyringKey
223
136
  } });
224
137
  }
225
- // ../kyber/dist/ui.mjs
226
- /** Formats a message with a status marker and colour: one helper per kind of line a command prints. */
227
- const style = {
228
- /** A green `✓` for something that worked. */
229
- success: (msg) => `${chalk.green("✓")} ${msg}`,
230
- /** A yellow `⚠` for something worth a second look. */
231
- warn: (msg) => `${chalk.yellow("⚠")} ${msg}`,
232
- /** A red `✗` for something that failed. */
233
- fail: (msg) => `${chalk.red("✗")} ${msg}`,
234
- /** A cyan `→` for a step being taken. */
235
- step: (msg) => `${chalk.cyan("→")} ${msg}`,
236
- /** A dim `·` marker for a row that's neither a pass nor a failure — loaded but inactive, or skipped. */
237
- skip: (msg) => chalk.dim(`· ${msg}`),
238
- /** Dimmed text for a suggestion or a next step. */
239
- hint: (msg) => chalk.dim(msg),
240
- /** Dimmed text for detail that should recede. */
241
- dim: (msg) => chalk.dim(msg),
242
- /** Bold text for a heading. */
243
- header: (msg) => chalk.bold(msg)
244
- };
138
+ // src/ui/progress/progress.ts
139
+ /** Says on the spinner when a request is being sent again, so a slow step is not mistaken for a stuck one. */
140
+ const retryNotice = (label, setText) => onRetry((e) => {
141
+ setText(`${label} (retrying ${e.vendor ?? "the request"}, attempt ${e.attempt} of ${e.of})`);
142
+ });
143
+ /** {@link createSpinnerProgress} with the retry notice hooked in. */
144
+ function createProgress$1(print, enabled = progressEnabled) {
145
+ return createProgress(print, enabled, retryNotice);
146
+ }
147
+ /** `fn` under a cleared-when-done spinner named `label`, on a terminal only, with the retry notice hooked in. */
148
+ function withProgress$1(label, fn) {
149
+ return withProgress(label, fn, retryNotice);
150
+ }
151
+ // src/ui/index.ts
152
+ var ui_exports = /* @__PURE__ */ __exportAll({
153
+ createProgress: () => createProgress$1,
154
+ withProgress: () => withProgress$1
155
+ });
156
+ import * as import__theholocron_kyber_prompts from "@theholocron/kyber/prompts";
157
+ __reExport(ui_exports, import__theholocron_kyber_prompts);
158
+ import * as import__theholocron_kyber_ui from "@theholocron/kyber/ui";
159
+ __reExport(ui_exports, import__theholocron_kyber_ui);
245
160
  // src/plugin/connection-probe/connection-probe.ts
246
161
  const TLS_CODES = /* @__PURE__ */ new Set([
247
162
  "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
@@ -541,7 +456,7 @@ async function syncRoles(input) {
541
456
  skipped: 0
542
457
  };
543
458
  for (const role of input.roles) {
544
- print(`\n${style.header(`${role.name} ← team ${role.team}`)}`);
459
+ print(`\n${ui_exports.style.header(`${role.name} ← team ${role.team}`)}`);
545
460
  const step = `role ${role.name}`;
546
461
  let plan;
547
462
  try {
@@ -555,7 +470,7 @@ async function syncRoles(input) {
555
470
  });
556
471
  } catch (err) {
557
472
  const message = describeProviderError(err);
558
- print(` ${style.fail(`${step}: ${message}`)}`);
473
+ print(` ${ui_exports.style.fail(`${step}: ${message}`)}`);
559
474
  result.failures.push({
560
475
  step,
561
476
  message
@@ -571,11 +486,11 @@ async function syncRoles(input) {
571
486
  };
572
487
  result.roles.push(outcome);
573
488
  result.skipped += plan.inSync;
574
- if (plan.inSync > 0) print(` ${style.skip(`${plan.inSync} already have it`)}`);
489
+ if (plan.inSync > 0) print(` ${ui_exports.style.skip(`${plan.inSync} already have it`)}`);
575
490
  const act = async (verb, who) => {
576
491
  const label = `${verb === "add" ? "gave" : "took"} ${role.name} ${verb === "add" ? "to" : "from"} ${who.login} (${who.member})`;
577
492
  if (dryRun || verb === "remove" && keep) {
578
- print(` ${style.skip(`would ${verb === "add" ? "give" : "take"} ${role.name} ${verb === "add" ? "to" : "from"} ${who.login} (${who.member})${keep && verb === "remove" ? " (kept: --keep)" : ""}`)}`);
493
+ print(` ${ui_exports.style.skip(`would ${verb === "add" ? "give" : "take"} ${role.name} ${verb === "add" ? "to" : "from"} ${who.login} (${who.member})${keep && verb === "remove" ? " (kept: --keep)" : ""}`)}`);
579
494
  result.skipped++;
580
495
  return;
581
496
  }
@@ -583,11 +498,11 @@ async function syncRoles(input) {
583
498
  if (verb === "add") await notifications.addRoleMember(role.name, who.member);
584
499
  else await notifications.removeRoleMember(role.name, who.member);
585
500
  (verb === "add" ? outcome.added : outcome.removed).push(who.member);
586
- print(` ${style.success(label)}`);
501
+ print(` ${ui_exports.style.success(label)}`);
587
502
  result.ok++;
588
503
  } catch (err) {
589
504
  const message = describeProviderError(err);
590
- print(` ${style.fail(`${step}: ${verb} ${who.login}: ${message}`)}`);
505
+ print(` ${ui_exports.style.fail(`${step}: ${verb} ${who.login}: ${message}`)}`);
591
506
  result.failures.push({
592
507
  step: `${step} ${verb} ${who.login}`,
593
508
  message
@@ -597,11 +512,11 @@ async function syncRoles(input) {
597
512
  for (const who of plan.add) await act("add", who);
598
513
  for (const who of plan.remove) await act("remove", who);
599
514
  for (const person of plan.unlinked) {
600
- print(` ${style.skip(`${person.login} is on the team but has not linked their account`)}`);
515
+ print(` ${ui_exports.style.skip(`${person.login} is on the team but has not linked their account`)}`);
601
516
  result.skipped++;
602
517
  }
603
518
  for (const holder of plan.unknownHolders) {
604
- print(` ${style.skip(`${holder.name ?? holder.member} holds ${role.name} but is not linked to anyone: left alone`)}`);
519
+ print(` ${ui_exports.style.skip(`${holder.name ?? holder.member} holds ${role.name} but is not linked to anyone: left alone`)}`);
605
520
  result.skipped++;
606
521
  }
607
522
  }
@@ -1,2 +1,2 @@
1
- import { $ as Environments, $t as SourceFile, A as DeployScriptResult, At as NotificationsMember, B as DnsRecord, Bt as ParseWebhookInput, C as ConnectionStringOptions, Ct as NotificationsApplicationLayout, D as DeployFunctionConfig, Dt as NotificationsForumTag, E as CredentialsInspection, Et as NotificationsEveryoneLayout, F as DeploymentTarget, Ft as NotificationsServerLayout, G as EnsureRelayResult, Gt as RepoSettings, H as DnsRecordType, Ht as PullRequest, I as DeploymentTrigger, It as NotificationsSignIn, J as EnsuredDiscussion, Jt as SecretScope, K as EnsureResult, Kt as ResolvedCapability, L as DiscussionPatch, Lt as NotificationsSignedIn, M as DeploymentProject, Mt as NotificationsOnboardingLayout, N as DeploymentProjectSettings, Nt as NotificationsPicture, O as DeployFunctionResult, Ot as NotificationsLayout, P as DeploymentRecord, Pt as NotificationsPinnedLayout, Q as EnvironmentReviewer, Qt as SourceBranch, R as DiscussionPost, Rt as NotificationsWelcomeLayout, S as CiRunStatus, St as NotificationsAccess, T as Credentials, Tt as NotificationsDelivery, U as EnsureDiscussionInput, Ut as RelayState, V as DnsRecordRequest, Vt as ProviderIdentity, W as EnsureRelayInput, Wt as RepoRef, X as EnsuredTunnel, Xt as ServerInspection, Y as EnsuredResource, Yt as Secrets, Z as Environment, Zt as Source, _ as Cardinality, _n as Wiki, _t as MonitoringCheck, a as REQUIRED_CAPABILITIES, an as Storage, at as LabelDef, b as CiRun, bn as WorkerScriptState, bt as NormalizedAuthUser, c as Analytics, cn as TeamPermission, ct as Logs, d as AuthEvent, dn as TrackerDoctorReport, dt as MonitoringAlertChannelResult, en as SourceRepoInfo, et as Errors, f as AuthEventType, fn as TrackerUser, ft as MonitoringAlertChannelState, g as CapabilityKey, gn as WebhookDashboardInfo, gt as MonitoringAssertionSource, h as CapabilityImpls, hn as Vault, ht as MonitoringAssertionComparison, i as ProviderApiError, in as StatusCategory, it as Issues, j as Deployment, jt as NotificationsMonitoringFeed, k as DeployScriptConfig, kt as NotificationsLinksLayout, l as Auth, ln as Tooling, lt as Monitoring, m as AuthUser, mn as Tunnels, mt as MonitoringAssertion, n as ElevationRequiredError, nn as SourceSecurity, nt as Issue, o as WebhookVerificationError, on as StorageBranch, ot as LifecycleResult, p as AuthIdentity, pn as TunnelRoute, pt as MonitoringAlertSettings, q as EnsureWebhookResult, qt as Ruleset, r as MissingTokenError, rn as SourceTeamMember, rt as IssueSearchFilter, s as isMulti, sn as TeamEntry, st as LifecycleSlot, t as CARDINALITY, tn as SourceRulesetDetail, tt as InspectRelayInput, u as AuthDescription, un as ToolingDoctorReport, ut as MonitoringAlertChannelInput, v as CardinalityFor, vn as WikiProvisionOpts, vt as MonitoringCheckInput, w as CreateAuthUserInput, wt as NotificationsChannelLayout, x as CiRunFilter, xn as Workers, xt as Notifications, y as Ci, yn as WikiProxyConfig, yt as MonitoringHttpMethod, z as Dns, zt as PagesConfig } from "../index-KMWrNLpJ.mjs";
2
- export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Credentials, CredentialsInspection, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, Environment, EnvironmentReviewer, Environments, Errors, InspectRelayInput, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RelayState, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, ServerInspection, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, WorkerScriptState, Workers, isMulti };
1
+ import { $ as DnsRecordType, $t as ParseWebhookInput, A as Ci, An as WebhookDashboardInfo, At as MonitoringCheckInput, B as DeployScriptConfig, Bt as NotificationsForumTag, C as BoardTemplate, Cn as Tooling, Ct as MonitoringAlertChannelResult, D as CapabilityKey, Dn as TunnelRoute, Dt as MonitoringAssertionComparison, E as CapabilityImpls, En as TrackerUser, Et as MonitoringAssertion, F as CreateAuthUserInput, Fn as Workers, Ft as NotificationsAccess, G as DeploymentRecord, Gt as NotificationsOnboardingLayout, H as Deployment, Ht as NotificationsLinksLayout, I as Credentials, It as NotificationsApplicationLayout, J as DiscussionPatch, Jt as NotificationsServerLayout, K as DeploymentTarget, Kt as NotificationsPicture, L as CredentialsInspection, Lt as NotificationsChannelLayout, M as CiRunFilter, Mn as WikiProvisionOpts, Mt as MoveReport, N as CiRunStatus, Nn as WikiProxyConfig, Nt as NormalizedAuthUser, O as Cardinality, On as Tunnels, Ot as MonitoringAssertionSource, P as ConnectionStringOptions, Pn as WorkerScriptState, Pt as Notifications, Q as DnsRecordRequest, Qt as PagesConfig, R as DeployFunctionConfig, Rt as NotificationsDelivery, S as BoardSummary, Sn as TeamPermission, St as MonitoringAlertChannelInput, T as BoardView, Tn as TrackerDoctorReport, Tt as MonitoringAlertSettings, U as DeploymentProject, Ut as NotificationsMember, V as DeployScriptResult, Vt as NotificationsLayout, W as DeploymentProjectSettings, Wt as NotificationsMonitoringFeed, X as Dns, Xt as NotificationsSignedIn, Y as DiscussionPost, Yt as NotificationsSignIn, Z as DnsRecord, Zt as NotificationsWelcomeLayout, _ as BoardItem, _n as SourceTeamMember, _t as LabelDef, a as REQUIRED_CAPABILITIES, an as RepoSettings, at as EnsureWebhookResult, b as BoardStatus, bn as StorageBranch, bt as Logs, c as Analytics, cn as SecretScope, ct as EnsuredTunnel, d as AuthEvent, dn as Source, dt as Environments, en as Projects, et as EnsureDiscussionInput, f as AuthEventType, fn as SourceBranch, ft as Errors, g as BoardFieldType, gn as SourceSecurity, gt as Issues, h as BoardField, hn as SourceRulesetDetail, ht as IssueSearchFilter, i as ProviderApiError, in as RepoRef, it as EnsureResult, j as CiRun, jn as Wiki, jt as MonitoringHttpMethod, k as CardinalityFor, kn as Vault, kt as MonitoringCheck, l as Auth, ln as Secrets, lt as Environment, m as AuthUser, mn as SourceRepoInfo, mt as Issue, n as ElevationRequiredError, nn as PullRequest, nt as EnsureRelayResult, o as WebhookVerificationError, on as ResolvedCapability, ot as EnsuredDiscussion, p as AuthIdentity, pn as SourceFile, pt as InspectRelayInput, q as DeploymentTrigger, qt as NotificationsPinnedLayout, r as MissingTokenError, rn as RelayState, rt as EnsureReport, s as isMulti, sn as Ruleset, st as EnsuredResource, t as CARDINALITY, tn as ProviderIdentity, tt as EnsureRelayInput, u as AuthDescription, un as ServerInspection, ut as EnvironmentReviewer, v as BoardRule, vn as StatusCategory, vt as LifecycleResult, w as BoardTemplateFile, wn as ToolingDoctorReport, wt as MonitoringAlertChannelState, x as BoardStatusCategory, xn as TeamEntry, xt as Monitoring, y as BoardState, yn as Storage, yt as LifecycleSlot, z as DeployFunctionResult, zt as NotificationsEveryoneLayout } from "../index-XBpiD6Sx.mjs";
2
+ export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Credentials, CredentialsInspection, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, Environment, EnvironmentReviewer, Environments, Errors, InspectRelayInput, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, MoveReport, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, PagesConfig, ParseWebhookInput, Projects, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RelayState, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, ServerInspection, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, WorkerScriptState, Workers, isMulti };
@@ -40,6 +40,8 @@ const CARDINALITY = {
40
40
  workers: "single",
41
41
  /** `tunnels` has exactly one provider. */
42
42
  tunnels: "single",
43
+ /** `projects` has exactly one provider. */
44
+ projects: "single",
43
45
  /** `credentials` can have several providers, tried in order. */
44
46
  credentials: "many"
45
47
  };
@@ -1,4 +1,4 @@
1
- import { n as Capability, r as ComposedPreset, t as compose } from "./index-CsLdvk4-.mjs";
1
+ import { n as Capability, r as ComposedPreset, t as compose } from "./index-D9taYHzW.mjs";
2
2
  /** Options for the audit capability. */
3
3
  interface AuditOptions {
4
4
  /** Enable Knip unused-export analysis (default: false). */