@theholocron/cli 5.0.0-alpha.415 → 5.0.0-alpha.416

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.
@@ -763,4 +763,4 @@ async function loadConfig(cwd, input = {}) {
763
763
  * const preset = compose(node(), nextjs());
764
764
  */
765
765
  const compose = system.compose;
766
- export { placeAreas as a, ConfigError$1 as c, resolveEntry as d, resolvePluginPackage$1 as f, loadConfig as i, credentialsEnvironment as l, compose as n, HOLOCRON_AREAS as o, defineConfig as r, SHARED_AREAS as s, ConfigFileError as t, resolveConfig as u };
766
+ export { placeAreas as a, repoSlug as c, resolveConfig as d, resolveEntry as f, layerEnvironment as h, loadConfig as i, ConfigError$1 as l, isEnvironmentLayer as m, compose as n, HOLOCRON_AREAS as o, resolvePluginPackage$1 as p, defineConfig as r, SHARED_AREAS as s, ConfigFileError as t, credentialsEnvironment as u };
package/dist/index.d.mts CHANGED
@@ -5,6 +5,7 @@ import { RequestOptions, RestClient, RestClientConfig, createRestClient } from "
5
5
  import "@theholocron/kyber/plugins";
6
6
  import { GitExec } from "@theholocron/git-utils";
7
7
  import { ConnectionProbeInput as ConnectionProbeInput$1 } from "@theholocron/kyber/checks";
8
+ import { Stats } from "node:fs";
8
9
  import "@theholocron/observability/core";
9
10
  import { ConfigDirArea } from "@theholocron/datapad";
10
11
  /** A plugin's `verifyToken` result when the provider accepted the token. */
@@ -172,6 +173,11 @@ interface Probe {
172
173
  summary: string;
173
174
  /** Whether it creates or changes anything on the provider. Asked about first, and needs `--yes` without a terminal. */
174
175
  writes: boolean;
176
+ /**
177
+ * Where the probe's rows go. Unset, stdout. A probe whose own output is the data on stdout (a `NAME=value` stream
178
+ * for a pipe) sets `stderr`, so the rows never mix with it.
179
+ */
180
+ reportsTo?: "stderr";
175
181
  /** Runs the probe, reporting and changing things only through `ctx`. */
176
182
  run(ctx: ProbeContext): Promise<void>;
177
183
  }
@@ -390,6 +396,32 @@ export declare const CANONICAL_LABELS: readonly [{
390
396
  readonly color: "ffffff";
391
397
  readonly description: "Won't be addressed";
392
398
  }];
399
+ /**
400
+ * What stdout is. A token is never written to a `terminal` (it would sit in scrollback) or to `other` (a redirect to
401
+ * a regular file, which would leave plaintext tokens on disk without the protections of the file option); only a
402
+ * `pipe` receives the lines. On a terminal they go to the file option instead, or the clipboard when asked.
403
+ */
404
+ type AuthExportOutKind = "terminal" | "pipe" | "other";
405
+ /**
406
+ * What file descriptor `fd` (stdout) is, for deciding where tokens may go: a `terminal`, a `pipe` (a FIFO, or the
407
+ * socket some shells and runners use for one), or `other` (a regular file, a device, or anything that cannot be
408
+ * inspected). Only a pipe is safe to write the lines to, so anything unknown is `other`.
409
+ */
410
+ export declare function stdoutKind(isTerminal: boolean, fd?: number, stat?: (fd: number) => Pick<Stats, "isFIFO" | "isSocket">): AuthExportOutKind;
411
+ /**
412
+ * The vault Environment `holocron secrets sync <environmentId>` reads. A layer word (`local`, `dev`, `ci`, `prod`) is the
413
+ * Environment of that layer of this repository, `<org/repo> - <layer>`; any other text is a literal Environment name.
414
+ * A literal name wins only when it is not exactly a layer word, so an Environment that is itself called `prod` cannot be
415
+ * addressed by that name (spec `tech-environment-layers`, #2069).
416
+ *
417
+ * @param id - The positional the user gave.
418
+ * @param input - Where the repository is (its `origin` remote is read there), and optionally how to read it.
419
+ * @throws {ConfigError} For a layer word when the remote cannot be read (the message names the `environment` option).
420
+ */
421
+ export declare function resolveEnvironmentId(id: string, input: {
422
+ repoRoot: string;
423
+ gitExec?: GitExec;
424
+ }): Promise<string>;
393
425
  /**
394
426
  * The closed list of area files `loadConfig` reads from `.holocron/` (the directory is `.<config name>`, set by kyber):
395
427
  * `.holocron/notifications.*` fills `providers.notifications`' `layout`, `.holocron/repo.*` fills keys of `repo`, and `.holocron/org.*` fills provider options (`teamId`, `accountId`) a config leaves out.
@@ -408,4 +440,4 @@ export declare const SHARED_AREAS: readonly ["org"];
408
440
  * is a `ConfigError` naming both (no merge, no precedence). With no area files the config is returned as it was.
409
441
  */
410
442
  export declare function placeAreas(areas: ConfigDirArea[], raw: HolocronConfig): HolocronConfig;
411
- 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, DuplicateDiscussion, 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, IdeaRecord, Ideas, type IdeasConfig, ImportOptions, ImportResult, InspectRelayInput, Issue, IssueComment, IssueOrder, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, Issues, KNOWN_STACK_DEPS, 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 RepoSecretsDeploy, 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, type StackName, 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, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };
443
+ export { AddedItem, Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, type AuthExportOutKind, 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, DuplicateDiscussion, 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, IdeaRecord, Ideas, type IdeasConfig, ImportOptions, ImportResult, InspectRelayInput, Issue, IssueComment, IssueOrder, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, Issues, KNOWN_STACK_DEPS, 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 RepoSecretsDeploy, 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, type StackName, 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, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CARDINALITY, ElevationRequiredError, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, isMulti } from "./plugin/capabilities.mjs";
2
- import { a as placeAreas, c as ConfigError, d as resolveEntry, f as resolvePluginPackage, i as loadConfig, l as credentialsEnvironment, n as compose, o as HOLOCRON_AREAS, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-CZVj19gs.mjs";
2
+ import { a as placeAreas, c as repoSlug, d as resolveConfig, f as resolveEntry, h as layerEnvironment, i as loadConfig, l as ConfigError, m as isEnvironmentLayer, n as compose, o as HOLOCRON_AREAS, p as resolvePluginPackage, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as credentialsEnvironment } from "./config-system-c8Ngywp-.mjs";
3
3
  import { Entry, findCredentials } from "@napi-rs/keyring";
4
4
  import { AuthError, createFeatureResolver as createFeatureResolver$1, createKeyring, createResolveToken as createResolveToken$1, resolveValue } from "@theholocron/kyber/secrets";
5
5
  import { describeError, style } from "@theholocron/kyber/ui";
@@ -8,6 +8,7 @@ import { createRestClient } from "@theholocron/http-client";
8
8
  import { connectionProbe as connectionProbe$1 } from "@theholocron/kyber/checks";
9
9
  import { join } from "node:path";
10
10
  import { readPackageJson } from "@theholocron/pkg-utils";
11
+ import { fstatSync } from "node:fs";
11
12
  // src/auth/auth.ts
12
13
  /**
13
14
  * The CLI's credentials: the OS keyring every plugin's bootstrap token lives in, and the two token resolvers built on
@@ -553,4 +554,34 @@ const CANONICAL_LABELS = [
553
554
  description: "Won't be addressed"
554
555
  }
555
556
  ];
556
- export { AuthError, CANONICAL_LABELS, CARDINALITY, ConfigError, ConfigFileError, ElevationRequiredError, HOLOCRON_AREAS, KNOWN_STACK_DEPS, 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 };
557
+ // src/commands/auth-export/stdout-kind/stdout-kind.ts
558
+ /**
559
+ * What file descriptor `fd` (stdout) is, for deciding where tokens may go: a `terminal`, a `pipe` (a FIFO, or the
560
+ * socket some shells and runners use for one), or `other` (a regular file, a device, or anything that cannot be
561
+ * inspected). Only a pipe is safe to write the lines to, so anything unknown is `other`.
562
+ */
563
+ function stdoutKind(isTerminal, fd = 1, stat = fstatSync) {
564
+ if (isTerminal) return "terminal";
565
+ try {
566
+ const s = stat(fd);
567
+ return s.isFIFO() || s.isSocket() ? "pipe" : "other";
568
+ } catch {
569
+ return "other";
570
+ }
571
+ }
572
+ // src/commands/secrets-sync/resolve-environment-id/resolve-environment-id.ts
573
+ /**
574
+ * The vault Environment `holocron secrets sync <environmentId>` reads. A layer word (`local`, `dev`, `ci`, `prod`) is the
575
+ * Environment of that layer of this repository, `<org/repo> - <layer>`; any other text is a literal Environment name.
576
+ * A literal name wins only when it is not exactly a layer word, so an Environment that is itself called `prod` cannot be
577
+ * addressed by that name (spec `tech-environment-layers`, #2069).
578
+ *
579
+ * @param id - The positional the user gave.
580
+ * @param input - Where the repository is (its `origin` remote is read there), and optionally how to read it.
581
+ * @throws {ConfigError} For a layer word when the remote cannot be read (the message names the `environment` option).
582
+ */
583
+ async function resolveEnvironmentId(id, input) {
584
+ if (!isEnvironmentLayer(id)) return id;
585
+ return layerEnvironment(await repoSlug(input.repoRoot, input.gitExec), id);
586
+ }
587
+ export { AuthError, CANONICAL_LABELS, CARDINALITY, ConfigError, ConfigFileError, ElevationRequiredError, HOLOCRON_AREAS, KNOWN_STACK_DEPS, 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, resolveEnvironmentId, resolvePluginPackage, resolveValue, roleTeamProblem, sourceProblem, stdoutKind, syncRoles };
package/dist/presets.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as compose } from "./config-system-CZVj19gs.mjs";
1
+ import { n as compose } from "./config-system-c8Ngywp-.mjs";
2
2
  import { DEFAULT_ORG } from "@theholocron/astromech";
3
3
  // src/presets/capabilities/audit.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.415",
3
+ "version": "5.0.0-alpha.416",
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/astromech": "5.0.0-alpha.415",
63
- "@theholocron/dagobah": "5.0.0-alpha.415",
64
- "@theholocron/datapad": "5.0.0-alpha.415",
65
- "@theholocron/env-utils": "^1.17.0-alpha.4",
66
- "@theholocron/fs-utils": "^1.17.0-alpha.4",
62
+ "@theholocron/astromech": "5.0.0-alpha.416",
63
+ "@theholocron/dagobah": "5.0.0-alpha.416",
64
+ "@theholocron/datapad": "5.0.0-alpha.416",
67
65
  "@theholocron/git-utils": "^1.17.0-alpha.4",
68
66
  "@theholocron/github-client": "^1.58.0-alpha.27",
67
+ "@theholocron/env-utils": "^1.17.0-alpha.4",
68
+ "@theholocron/fs-utils": "^1.17.0-alpha.4",
69
69
  "@theholocron/json-utils": "^1.17.0-alpha.4",
70
- "@theholocron/http-client": "^1.58.0-alpha.27",
71
- "@theholocron/kyber": "5.0.0-alpha.415",
70
+ "@theholocron/kyber": "5.0.0-alpha.416",
72
71
  "@theholocron/misc-utils": "^1.17.0-alpha.4",
73
- "@theholocron/pkg-utils": "^1.17.0-alpha.4",
74
- "@theholocron/observability": "^0.7.0-alpha.4"
72
+ "@theholocron/observability": "^0.7.0-alpha.4",
73
+ "@theholocron/http-client": "^1.58.0-alpha.27",
74
+ "@theholocron/pkg-utils": "^1.17.0-alpha.4"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/node": "^26",
@@ -84,10 +84,10 @@
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.16",
88
87
  "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.16",
89
88
  "@theholocron/tsconfig": "^8.9.0-alpha.16",
90
- "@theholocron/vitest-config": "^8.9.0-alpha.16"
89
+ "@theholocron/vitest-config": "^8.9.0-alpha.16",
90
+ "@theholocron/eslint-config": "^8.9.0-alpha.16"
91
91
  },
92
92
  "engines": {
93
93
  "node": ">=22.0.0"