@theholocron/cli 5.0.0-alpha.393 → 5.0.0-alpha.394

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4,9 +4,9 @@ import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInpu
4
4
  import { CheckRow } from "@theholocron/kyber/ui";
5
5
  import { RequestOptions, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
6
6
  import "@theholocron/kyber/plugins";
7
+ import { ConnectionProbeInput as ConnectionProbeInput$1 } from "@theholocron/kyber/checks";
7
8
  import { PackageJson } from "@theholocron/pkg-utils";
8
9
  import { WorkspacePackage } from "@theholocron/astromech";
9
- import { ConnectionProbeInput as ConnectionProbeInput$1 } from "@theholocron/kyber/checks";
10
10
  import "@theholocron/observability/core";
11
11
  import { ConfigDirArea } from "@theholocron/datapad";
12
12
  /** A plugin's `verifyToken` result when the provider accepted the token. */
@@ -92,6 +92,50 @@ export declare function createResolveToken(config: ResolveTokenConfig): TokenRes
92
92
  * the operation fails with a message naming the exact variable to set and `holocron auth set`.
93
93
  */
94
94
  export declare function createFeatureResolver(config: FeatureResolverConfig): FeatureResolver;
95
+ /**
96
+ * Puts issue keys in creation order without asking the tracker: issue numbers (`#12`, `ENG-12`) rise with creation inside
97
+ * one repository or team, so the trailing number is the order. `oldest` is ascending, `newest` descending; keys with the
98
+ * same number keep their place. A key with no trailing number is an error, because nothing can be said of its age.
99
+ */
100
+ export declare function orderKeys(keys: readonly string[], order: IssueOrder): string[];
101
+ /**
102
+ * Keeps the first or last `limit` of a listing by creation time, returned oldest first. `createdAt` reads an item's
103
+ * ISO timestamp; items created in the same instant keep their listed order. The cut happens on what the listing already
104
+ * holds, so no request is spent on an item that is dropped.
105
+ */
106
+ export declare function pickByCreation<T>(items: readonly T[], createdAt: (item: T) => string, order: IssueOrder, limit: number): T[];
107
+ /** What {@link readKeysLimited} needs. */
108
+ interface ReadKeysLimitedInput<T> {
109
+ /** The issue keys to choose from. */
110
+ keys: readonly string[];
111
+ /** Which end of the creation order to take first. */
112
+ order: IssueOrder;
113
+ /** How many items to keep. */
114
+ limit: number;
115
+ /** The most issues fetched at once. */
116
+ concurrency: number;
117
+ /** Fetches one issue by key. */
118
+ fetch: (key: string) => Promise<T>;
119
+ /** Whether a fetched issue counts against the limit; false skips it without using the budget. */
120
+ keep: (item: T) => boolean;
121
+ }
122
+ /**
123
+ * Reads an explicit list of issues in creation order until `limit` of them are kept. The keys are sorted by number first
124
+ * (see {@link orderKeys}), then fetched in small steps of at most `concurrency`, each step no bigger than the places
125
+ * still open, so an issue that is later skipped (a pull request, a closed one) is replaced by the next key and nothing
126
+ * beyond the budget is fetched unless a skip made room. Within a step the fetches run together; the results keep the key
127
+ * order. The kept items come back oldest first, whichever end was chosen.
128
+ */
129
+ export declare function readKeysLimited<T>(input: ReadKeysLimitedInput<T>): Promise<T[]>;
130
+ /**
131
+ * Calls a provider's optional `onProgress` hook with how many items are done of how many. A hook that throws is
132
+ * ignored, because a progress counter must never change or stop the read or write it reports on.
133
+ *
134
+ * @param onProgress - The hook from `ExportInfo` or `ImportOptions`; nothing happens when it is not given.
135
+ * @param done - How many items are finished.
136
+ * @param total - How many items there are.
137
+ */
138
+ export declare function reportProgress(onProgress: ((done: number, total: number) => void) | undefined, done: number, total: number): void;
95
139
  /** One line a probe reports: `info` for a fact, `ok` / `fail` for a result, `heading` to title the rows that follow. */
96
140
  interface ProbeRow {
97
141
  /** `ok` or `fail` for a result, `info` for a fact, `heading` to title the rows that follow. */
@@ -161,50 +205,16 @@ interface ProviderActions {
161
205
  /** Compares what the provider's own config block declares with what exists, read-only. Optional. */
162
206
  doctor?: ProviderAction;
163
207
  }
164
- /**
165
- * Puts issue keys in creation order without asking the tracker: issue numbers (`#12`, `ENG-12`) rise with creation inside
166
- * one repository or team, so the trailing number is the order. `oldest` is ascending, `newest` descending; keys with the
167
- * same number keep their place. A key with no trailing number is an error, because nothing can be said of its age.
168
- */
169
- export declare function orderKeys(keys: readonly string[], order: IssueOrder): string[];
170
- /**
171
- * Keeps the first or last `limit` of a listing by creation time, returned oldest first. `createdAt` reads an item's
172
- * ISO timestamp; items created in the same instant keep their listed order. The cut happens on what the listing already
173
- * holds, so no request is spent on an item that is dropped.
174
- */
175
- export declare function pickByCreation<T>(items: readonly T[], createdAt: (item: T) => string, order: IssueOrder, limit: number): T[];
176
- /** What {@link readKeysLimited} needs. */
177
- interface ReadKeysLimitedInput<T> {
178
- /** The issue keys to choose from. */
179
- keys: readonly string[];
180
- /** Which end of the creation order to take first. */
181
- order: IssueOrder;
182
- /** How many items to keep. */
183
- limit: number;
184
- /** The most issues fetched at once. */
185
- concurrency: number;
186
- /** Fetches one issue by key. */
187
- fetch: (key: string) => Promise<T>;
188
- /** Whether a fetched issue counts against the limit; false skips it without using the budget. */
189
- keep: (item: T) => boolean;
208
+ /** What a connection probe needs to check a provider's host and token: kyber's input, with the plugin's `verifyToken` as `verify`. */
209
+ export interface ConnectionProbeInput extends Omit<ConnectionProbeInput$1, "verify"> {
210
+ /** The plugin's `verifyToken`: asks the provider who the token belongs to. */
211
+ verify: (token: string) => Promise<VerifyTokenResult>;
190
212
  }
191
213
  /**
192
- * Reads an explicit list of issues in creation order until `limit` of them are kept. The keys are sorted by number first
193
- * (see {@link orderKeys}), then fetched in small steps of at most `concurrency`, each step no bigger than the places
194
- * still open, so an issue that is later skipped (a pull request, a closed one) is replaced by the next key and nothing
195
- * beyond the budget is fetched unless a skip made room. Within a step the fetches run together; the results keep the key
196
- * order. The kept items come back oldest first, whichever end was chosen.
197
- */
198
- export declare function readKeysLimited<T>(input: ReadKeysLimitedInput<T>): Promise<T[]>;
199
- /**
200
- * Calls a provider's optional `onProgress` hook with how many items are done of how many. A hook that throws is
201
- * ignored, because a progress counter must never change or stop the read or write it reports on.
202
- *
203
- * @param onProgress - The hook from `ExportInfo` or `ImportOptions`; nothing happens when it is not given.
204
- * @param done - How many items are finished.
205
- * @param total - How many items there are.
214
+ * The `connection` probe every provider offers, for telling a network problem from a credential problem. The checks are
215
+ * kyber's `connectionProbe`; this types the result as the plugin system's {@link Probe} and `verify` as `VerifyTokenResult`.
206
216
  */
207
- export declare function reportProgress(onProgress: ((done: number, total: number) => void) | undefined, done: number, total: number): void;
217
+ export declare function connectionProbe(input: ConnectionProbeInput): Probe;
208
218
  interface RoleSyncOutcome {
209
219
  role: string;
210
220
  team: string;
@@ -474,14 +484,4 @@ export declare const SHARED_AREAS: readonly ["org"];
474
484
  * is a `ConfigError` naming both (no merge, no precedence). With no area files the config is returned as it was.
475
485
  */
476
486
  export declare function placeAreas(areas: ConfigDirArea[], raw: HolocronConfig): HolocronConfig;
477
- /** What a connection probe needs to check a provider's host and token: kyber's input, with the plugin's `verifyToken` as `verify`. */
478
- export interface ConnectionProbeInput extends Omit<ConnectionProbeInput$1, "verify"> {
479
- /** The plugin's `verifyToken`: asks the provider who the token belongs to. */
480
- verify: (token: string) => Promise<VerifyTokenResult>;
481
- }
482
- /**
483
- * The `connection` probe every provider offers, for telling a network problem from a credential problem. The checks are
484
- * kyber's `connectionProbe`; this types the result as the plugin system's {@link Probe} and `verify` as `VerifyTokenResult`.
485
- */
486
- export declare function connectionProbe(input: ConnectionProbeInput): Probe;
487
487
  export { AddedItem, Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, BoardItemInput, 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, ExportInfo, type FeatureResolver, type FeatureResolverConfig, type GitHubAppConfig, type HolocronConfig, type HolocronProfile, ImportOptions, ImportResult, InspectRelayInput, Issue, IssueComment, IssueOrder, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, LogsDataset, 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, NotificationsPrsFeed, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type OrgConfig, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, Projects, type ProviderAction, type ProviderActionContext, type ProviderActions, ProviderApiError, ProviderIdentity, type ProviderOptions, type ProviderRow, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type ReadKeysLimitedInput, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RepoVariablesSync, 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, SyncResult, 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, defineConfig, isMulti, loadConfig, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };
package/dist/index.mjs CHANGED
@@ -5,10 +5,10 @@ import { AuthError, createFeatureResolver as createFeatureResolver$1, createKeyr
5
5
  import { describeError, style } from "@theholocron/kyber/ui";
6
6
  import { errorMessage } from "@theholocron/misc-utils";
7
7
  import { createRestClient } from "@theholocron/http-client";
8
+ import { connectionProbe as connectionProbe$1 } from "@theholocron/kyber/checks";
8
9
  import { join } from "node:path";
9
10
  import { readPackageJson } from "@theholocron/pkg-utils";
10
- import { connectionProbe as connectionProbe$1 } from "@theholocron/kyber/checks";
11
- // src/auth.ts
11
+ // src/auth/auth.ts
12
12
  /**
13
13
  * The CLI's credentials: the OS keyring every plugin's bootstrap token lives in, and the two token resolvers built on
14
14
  * it. Both are public, so a plugin's `src/auth.ts` is a one-line call.
@@ -62,7 +62,7 @@ function createFeatureResolver(config) {
62
62
  keyringKey: config.keyringKey
63
63
  } });
64
64
  }
65
- // src/plugin/order-keys/order-keys.ts
65
+ // src/plugin/issues-provider/order-keys/order-keys.ts
66
66
  /**
67
67
  * Puts issue keys in creation order without asking the tracker: issue numbers (`#12`, `ENG-12`) rise with creation inside
68
68
  * one repository or team, so the trailing number is the order. `oldest` is ascending, `newest` descending; keys with the
@@ -81,7 +81,7 @@ function orderKeys(keys, order) {
81
81
  const sign = order === "newest" ? -1 : 1;
82
82
  return numbered.sort((a, b) => sign * (a.n - b.n) || a.index - b.index).map((e) => e.key);
83
83
  }
84
- // src/plugin/pick-by-creation/pick-by-creation.ts
84
+ // src/plugin/issues-provider/pick-by-creation/pick-by-creation.ts
85
85
  /**
86
86
  * Keeps the first or last `limit` of a listing by creation time, returned oldest first. `createdAt` reads an item's
87
87
  * ISO timestamp; items created in the same instant keep their listed order. The cut happens on what the listing already
@@ -95,7 +95,7 @@ function pickByCreation(items, createdAt, order, limit) {
95
95
  })).sort((a, b) => a.at - b.at || a.index - b.index).map((e) => e.item);
96
96
  return order === "newest" ? ascending.slice(Math.max(ascending.length - limit, 0)) : ascending.slice(0, limit);
97
97
  }
98
- // src/plugin/read-keys-limited/read-keys-limited.ts
98
+ // src/plugin/issues-provider/read-keys-limited/read-keys-limited.ts
99
99
  /**
100
100
  * Reads an explicit list of issues in creation order until `limit` of them are kept. The keys are sorted by number first
101
101
  * (see {@link orderKeys}), then fetched in small steps of at most `concurrency`, each step no bigger than the places
@@ -116,7 +116,7 @@ async function readKeysLimited(input) {
116
116
  }
117
117
  return order === "newest" ? kept.reverse() : kept;
118
118
  }
119
- // src/plugin/report-progress/report-progress.ts
119
+ // src/plugin/issues-provider/report-progress/report-progress.ts
120
120
  /**
121
121
  * Calls a provider's optional `onProgress` hook with how many items are done of how many. A hook that throws is
122
122
  * ignored, because a progress counter must never change or stop the read or write it reports on.
@@ -130,6 +130,14 @@ function reportProgress(onProgress, done, total) {
130
130
  onProgress?.(done, total);
131
131
  } catch {}
132
132
  }
133
+ // src/plugin/probes/connection-probe/connection-probe.ts
134
+ /**
135
+ * The `connection` probe every provider offers, for telling a network problem from a credential problem. The checks are
136
+ * kyber's `connectionProbe`; this types the result as the plugin system's {@link Probe} and `verify` as `VerifyTokenResult`.
137
+ */
138
+ function connectionProbe(input) {
139
+ return connectionProbe$1(input);
140
+ }
133
141
  // src/commands/notifications-sync-roles/links.ts
134
142
  const EMPTY_LINKS = {
135
143
  version: 1,
@@ -544,12 +552,4 @@ const CANONICAL_LABELS = [
544
552
  description: "Won't be addressed"
545
553
  }
546
554
  ];
547
- // src/plugin/connection-probe/connection-probe.ts
548
- /**
549
- * The `connection` probe every provider offers, for telling a network problem from a credential problem. The checks are
550
- * kyber's `connectionProbe`; this types the result as the plugin system's {@link Probe} and `verify` as `VerifyTokenResult`.
551
- */
552
- function connectionProbe(input) {
553
- return connectionProbe$1(input);
554
- }
555
555
  export { AuthError, CANONICAL_LABELS, CARDINALITY, ConfigError, ConfigFileError, ElevationRequiredError, HOLOCRON_AREAS, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, SHARED_AREAS, WebhookVerificationError, compose, connectionProbe, createFeatureResolver, createResolveToken, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, keyring, loadConfig, missingCapabilities, orderKeys, pickByCreation, placeAreas, readKeysLimited, readLinks, readWorkspacePackageJsons, reportProgress, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue, roleTeamProblem, sourceProblem, syncRoles };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.393",
3
+ "version": "5.0.0-alpha.394",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -59,19 +59,19 @@
59
59
  "posthog-node": "^5.61.2",
60
60
  "tsx": "4.23.15",
61
61
  "yargs": "^18.1.0",
62
- "@theholocron/dagobah": "5.0.0-alpha.393",
63
- "@theholocron/astromech": "5.0.0-alpha.393",
62
+ "@theholocron/astromech": "5.0.0-alpha.394",
63
+ "@theholocron/dagobah": "5.0.0-alpha.394",
64
64
  "@theholocron/env-utils": "^1.17.0-alpha.3",
65
65
  "@theholocron/fs-utils": "^1.17.0-alpha.3",
66
- "@theholocron/http-client": "^1.58.0-alpha.25",
67
66
  "@theholocron/git-utils": "^1.17.0-alpha.3",
68
- "@theholocron/json-utils": "^1.17.0-alpha.3",
69
67
  "@theholocron/github-client": "^1.58.0-alpha.25",
70
- "@theholocron/kyber": "5.0.0-alpha.393",
68
+ "@theholocron/http-client": "^1.58.0-alpha.25",
69
+ "@theholocron/kyber": "5.0.0-alpha.394",
70
+ "@theholocron/json-utils": "^1.17.0-alpha.3",
71
71
  "@theholocron/misc-utils": "^1.17.0-alpha.3",
72
- "@theholocron/datapad": "5.0.0-alpha.393",
73
72
  "@theholocron/observability": "^0.7.0-alpha.3",
74
- "@theholocron/pkg-utils": "^1.17.0-alpha.3"
73
+ "@theholocron/pkg-utils": "^1.17.0-alpha.3",
74
+ "@theholocron/datapad": "5.0.0-alpha.394"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/node": "^26",
@@ -84,9 +84,9 @@
84
84
  "tsdown": "^0.23.5",
85
85
  "typescript": "^5.9.3",
86
86
  "vitest": "^5.1.0",
87
- "@theholocron/eslint-config": "^8.9.0-alpha.15",
88
- "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.15",
89
87
  "@theholocron/tsconfig": "^8.9.0-alpha.15",
88
+ "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.15",
89
+ "@theholocron/eslint-config": "^8.9.0-alpha.15",
90
90
  "@theholocron/vitest-config": "^8.9.0-alpha.15"
91
91
  },
92
92
  "engines": {