@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.
- package/README.md +2 -2
- package/dist/cli.mjs +472 -1702
- package/dist/cli.mjs.map +1 -1
- package/dist/{index-CsLdvk4-.d.mts → index-D9taYHzW.d.mts} +1 -1
- package/dist/{index-KMWrNLpJ.d.mts → index-XBpiD6Sx.d.mts} +197 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +58 -143
- package/dist/plugin/capabilities.d.mts +2 -2
- package/dist/plugin/capabilities.mjs +2 -0
- package/dist/presets.d.mts +1 -1
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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
|
|
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-
|
|
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 {
|
|
4
|
-
import {
|
|
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
|
|
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
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
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
|
-
//
|
|
226
|
-
/**
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
|
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
|
};
|
package/dist/presets.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Capability, r as ComposedPreset, t as compose } from "./index-
|
|
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). */
|