@theholocron/cli 5.0.0-alpha.360 → 5.0.0-alpha.361

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.
@@ -11,14 +11,16 @@ interface LogConfig {
11
11
  */
12
12
  level?: LogLevel;
13
13
  /**
14
- * Axiom log-shipping. Set `axiom.dataset` to opt local runs into Axiom
15
- * without exporting `HOLOCRON_AXIOM_DATASET` — the CLI then pairs it with
16
- * the token from `HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN` or the OS keyring
17
- * (`holocron auth set axiom[.<org>] <TOKEN>`). Env vars still win. In CI,
18
- * the `AXIOM_DATASET` variable (synced from 1Password) supplies it.
14
+ * Axiom log-shipping. The CLI has one dataset for all its environments, told apart by
15
+ * the `env` field on each line, and that dataset normally comes from the
16
+ * `HOLOCRON_AXIOM_DATASET` variable (`holocron`, synced from 1Password) with no config at all.
17
+ * Set `axiom.dataset` only for a repo that keeps its own dataset: the CLI
18
+ * pairs it with the token from `HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN` or the
19
+ * OS keyring (`holocron auth set axiom[.<org>] <TOKEN>`). Env vars still
20
+ * win, and a `global`-context command ignores it.
19
21
  */
20
22
  axiom?: {
21
- /** Target Axiom dataset, e.g. `"holocron-local"`. */
23
+ /** Target Axiom dataset for this repo, e.g. `"my-repo"`. */
22
24
  dataset?: string;
23
25
  };
24
26
  }
@@ -193,6 +195,12 @@ interface RepoValidationConfig {
193
195
  * does not use is ignored; a provider or option not listed here is an error.
194
196
  */
195
197
  interface OrgConfig {
198
+ /**
199
+ * The organization's DNS zone (`theholocron.dev`). The loader sets `domain` on a config that leaves it out; a
200
+ * config that sets it too is a `ConfigError`. A file that must build a hostname before the loader runs imports
201
+ * this area file instead (`import org from "./org.js"`).
202
+ */
203
+ domain?: string;
196
204
  /** Options filled into every `cloudflare` provider entry. */
197
205
  cloudflare?: {
198
206
  /** The Cloudflare account id (an identifier, not a credential). */
@@ -397,10 +397,15 @@ const ORG_OPTIONS = {
397
397
  };
398
398
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
399
399
  const isTuple = (entry) => Array.isArray(entry) && entry.length === 2 && typeof entry[0] === "string" && isObject(entry[1]);
400
- /** Check the shape of the area file: a closed list of providers, each with a closed list of string options. */
400
+ /**
401
+ * Check the shape of the area file: the top-level `domain` (a non-empty string), then a closed list of providers,
402
+ * each with a closed list of string options.
403
+ */
401
404
  function validate(area) {
402
405
  if (!isObject(area.value)) throw new ConfigError(`${area.path} must export the org settings as an object`);
403
- for (const [provider, options] of Object.entries(area.value)) {
406
+ const { domain, ...rest } = area.value;
407
+ if (domain !== void 0 && (typeof domain !== "string" || domain === "")) throw new ConfigError(`${area.path}: "domain" must be a non-empty string`);
408
+ for (const [provider, options] of Object.entries(rest)) {
404
409
  const allowed = ORG_OPTIONS[provider];
405
410
  if (allowed === void 0) throw new ConfigError(`${area.path} has an unknown provider "${provider}". Known: ${Object.keys(ORG_OPTIONS).join(", ")}`);
406
411
  if (!isObject(options)) throw new ConfigError(`${area.path}: "${provider}" must be an object of options`);
@@ -409,22 +414,36 @@ function validate(area) {
409
414
  if (typeof value !== "string" || value === "") throw new ConfigError(`${area.path}: "${provider}.${option}" must be a non-empty string`);
410
415
  }
411
416
  }
412
- return area.value;
417
+ return {
418
+ ...domain !== void 0 ? { domain } : {},
419
+ providers: rest
420
+ };
413
421
  }
414
422
  /**
415
423
  * The org options of an area and, when the repository root has the same area, the root's under them: an option set in
416
424
  * both takes the config's own value, option by option (the root's other options stay). Each file is checked on its own.
417
425
  */
418
426
  function merge(area) {
419
- const merged = {};
420
- for (const layer of area.root ? [area.root, area] : [area]) for (const [provider, options] of Object.entries(validate(layer))) {
421
- const sourced = merged[provider] ??= {};
422
- for (const [option, value] of Object.entries(options)) sourced[option] = {
423
- value,
427
+ const providers = {};
428
+ let domain;
429
+ for (const layer of area.root ? [area.root, area] : [area]) {
430
+ const checked = validate(layer);
431
+ if (checked.domain !== void 0) domain = {
432
+ value: checked.domain,
424
433
  path: layer.path
425
434
  };
435
+ for (const [provider, options] of Object.entries(checked.providers)) {
436
+ const sourced = providers[provider] ??= {};
437
+ for (const [option, value] of Object.entries(options)) sourced[option] = {
438
+ value,
439
+ path: layer.path
440
+ };
441
+ }
426
442
  }
427
- return merged;
443
+ return {
444
+ ...domain ? { domain } : {},
445
+ providers
446
+ };
428
447
  }
429
448
  /** Fill one entry when it names a provider the area holds; throws when the config already sets one of its options. */
430
449
  function fill(entry, org, capability) {
@@ -442,7 +461,9 @@ function fill(entry, org, capability) {
442
461
  }];
443
462
  }
444
463
  /**
445
- * Fill the provider options of `.holocron/org.*` into the providers the config uses. A provider entry (a name, a
464
+ * Fill `.holocron/org.*` into the config. Its top-level `domain` (the org's zone) is set on a config that leaves
465
+ * `domain` out; set inline and in the file it is a `ConfigError` naming both. Its provider options go into the
466
+ * providers the config uses. A provider entry (a name, a
446
467
  * `[name, options]` tuple, or either inside a list) that names a provider the file holds gets each option it leaves
447
468
  * out. An option set inline and in the file is a `ConfigError` naming both (no merge, no precedence); a provider the
448
469
  * config does not use is ignored; a provider or option the file lists but `OrgConfig` does not know is an error.
@@ -450,12 +471,17 @@ function fill(entry, org, capability) {
450
471
  * option by option and the config's own file wins; that is not an error.
451
472
  */
452
473
  function placeOrg(raw, area) {
453
- const org = merge(area);
454
- if (raw.providers === void 0) return raw;
455
- const providers = { ...raw.providers };
456
- for (const [capability, entry] of Object.entries(raw.providers)) providers[capability] = Array.isArray(entry) && !isTuple(entry) ? entry.map((item) => fill(item, org, capability)) : fill(entry, org, capability);
457
- return {
474
+ const { domain, providers: org } = merge(area);
475
+ if (domain !== void 0 && raw.domain !== void 0) throw new ConfigError(`domain is set in the config and in ${domain.path}. Set it in one place: remove the inline value or the key from ${domain.path}`);
476
+ const withDomain = domain === void 0 ? raw : {
458
477
  ...raw,
478
+ domain: domain.value
479
+ };
480
+ if (withDomain.providers === void 0) return withDomain;
481
+ const providers = { ...withDomain.providers };
482
+ for (const [capability, entry] of Object.entries(withDomain.providers)) providers[capability] = Array.isArray(entry) && !isTuple(entry) ? entry.map((item) => fill(item, org, capability)) : fill(entry, org, capability);
483
+ return {
484
+ ...withDomain,
459
485
  providers
460
486
  };
461
487
  }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as DnsRecordType, $t as PagesConfig, A as Ci, An as Vault, At as MonitoringCheckInput, B as DeployScriptConfig, Bt as NotificationsForumTag, C as BoardTemplate, Cn as TeamPermission, Ct as MonitoringAlertChannelResult, D as CapabilityKey, Dn as TrackerUser, Dt as MonitoringAssertionComparison, E as CapabilityImpls, En as TrackerDoctorReport, Et as MonitoringAssertion, F as CreateAuthUserInput, Fn as WorkerScriptState, Ft as NotificationsAccess, G as DeploymentRecord, Gt as NotificationsOnboardingLayout, H as Deployment, Ht as NotificationsLinksLayout, I as Credentials, In as Workers, It as NotificationsApplicationLayout, J as DiscussionPatch, Jt as NotificationsPrsFeed, K as DeploymentTarget, Kt as NotificationsPicture, L as CredentialsInspection, Lt as NotificationsChannelLayout, M as CiRunFilter, Mn as Wiki, Mt as MoveReport, N as CiRunStatus, Nn as WikiProvisionOpts, Nt as NormalizedAuthUser, O as Cardinality, On as TunnelRoute, Ot as MonitoringAssertionSource, P as ConnectionStringOptions, Pn as WikiProxyConfig, Pt as Notifications, Q as DnsRecordRequest, Qt as NotificationsWelcomeLayout, R as DeployFunctionConfig, Rt as NotificationsDelivery, S as BoardSummary, Sn as TeamEntry, St as MonitoringAlertChannelInput, T as BoardView, Tn as ToolingDoctorReport, 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 NotificationsSignIn, Y as DiscussionPost, Yt as NotificationsServerLayout, Z as DnsRecord, Zt as NotificationsSignedIn, _ as BoardItem, _n as SourceSecurity, _t as LabelDef, a as REQUIRED_CAPABILITIES, an as RepoRef, at as EnsureWebhookResult, b as BoardStatus, bn as Storage, bt as Logs, c as Analytics, cn as Ruleset, ct as EnsuredTunnel, d as AuthEvent, dn as ServerInspection, dt as Environments, en as ParseWebhookInput, et as EnsureDiscussionInput, f as AuthEventType, fn as Source, ft as Errors, g as BoardFieldType, gn as SourceRulesetDetail, gt as Issues, h as BoardField, hn as SourceRepoInfo, ht as IssueSearchFilter, i as ProviderApiError, in as RelayState, it as EnsureResult, j as CiRun, jn as WebhookDashboardInfo, jt as MonitoringHttpMethod, k as CardinalityFor, kn as Tunnels, kt as MonitoringCheck, l as Auth, ln as SecretScope, lt as Environment, m as AuthUser, mn as SourceFile, mt as Issue, n as ElevationRequiredError, nn as ProviderIdentity, nt as EnsureRelayResult, o as WebhookVerificationError, on as RepoSettings, ot as EnsuredDiscussion, p as AuthIdentity, pn as SourceBranch, pt as InspectRelayInput, q as DeploymentTrigger, qt as NotificationsPinnedLayout, r as MissingTokenError, rn as PullRequest, rt as EnsureReport, s as isMulti, sn as ResolvedCapability, st as EnsuredResource, t as CARDINALITY, tn as Projects, tt as EnsureRelayInput, u as AuthDescription, un as Secrets, ut as EnvironmentReviewer, v as BoardRule, vn as SourceTeamMember, vt as LifecycleResult, w as BoardTemplateFile, wn as Tooling, wt as MonitoringAlertChannelState, x as BoardStatusCategory, xn as StorageBranch, xt as Monitoring, y as BoardState, yn as StatusCategory, yt as LifecycleSlot, z as DeployFunctionResult, zt as NotificationsEveryoneLayout } from "./index-oC-J5CCm.mjs";
2
- import { A as RawProviderEntry, B as ResolvedHolocronConfig, C as EslintConfig, D as MultiEntry, E as LogConfig, F as RepoSecrets, G as StorybookDeployProject, H as ResolvedProvidersConfig, I as RepoSecretsSync, J as WorkflowWithConfig, K as TaskEntryConfig, L as RepoValidationConfig, M as RepoConfig, N as RepoProperties, O as OrgConfig, P as RepoProtection, R as RepoVariables, S as EnvConfig, T as HolocronConfig, U as ResolvedTuple, V as ResolvedProviderEntry, W as SingleEntry, _ as CredentialsConfig, a as LoadedConfig, b as DocsConfig, c as TaskEntry, d as resolveConfig, f as resolveEntry, g as ChromaticProjectConfig, h as CapabilityConfigPackage, i as loadConfig, j as RawProvidersConfig, k as ProviderOptions, l as ConfigError, m as AppConfig, n as compose, o as Capability, p as resolvePluginPackage, q as TelemetryConfig, r as defineConfig, s as ComposedPreset, t as ConfigFileError, u as credentialsEnvironment, v as DevConfig, w as GitHubAppConfig, x as DoctorConfig, y as DevServeConfig, z as RepoVariablesSync } from "./config-system-BkIbjZQi.mjs";
2
+ import { A as RawProviderEntry, B as ResolvedHolocronConfig, C as EslintConfig, D as MultiEntry, E as LogConfig, F as RepoSecrets, G as StorybookDeployProject, H as ResolvedProvidersConfig, I as RepoSecretsSync, J as WorkflowWithConfig, K as TaskEntryConfig, L as RepoValidationConfig, M as RepoConfig, N as RepoProperties, O as OrgConfig, P as RepoProtection, R as RepoVariables, S as EnvConfig, T as HolocronConfig, U as ResolvedTuple, V as ResolvedProviderEntry, W as SingleEntry, _ as CredentialsConfig, a as LoadedConfig, b as DocsConfig, c as TaskEntry, d as resolveConfig, f as resolveEntry, g as ChromaticProjectConfig, h as CapabilityConfigPackage, i as loadConfig, j as RawProvidersConfig, k as ProviderOptions, l as ConfigError, m as AppConfig, n as compose, o as Capability, p as resolvePluginPackage, q as TelemetryConfig, r as defineConfig, s as ComposedPreset, t as ConfigFileError, u as credentialsEnvironment, v as DevConfig, w as GitHubAppConfig, x as DoctorConfig, y as DevServeConfig, z as RepoVariablesSync } from "./config-system-BLKX9ztT.mjs";
3
3
  import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, resolveValue } from "@theholocron/kyber/secrets";
4
4
  import { RequestOptions, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
5
5
  import "@theholocron/kyber/plugins";
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-xLN8TV6N.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-BVYtgrmR.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";
@@ -1,4 +1,4 @@
1
- import { n as compose, o as Capability, s as ComposedPreset } from "./config-system-BkIbjZQi.mjs";
1
+ import { n as compose, o as Capability, s as ComposedPreset } from "./config-system-BLKX9ztT.mjs";
2
2
  /** Options for the audit capability. */
3
3
  interface AuditOptions {
4
4
  /** Enable Knip unused-export analysis (default: false). */
package/dist/presets.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as compose } from "./config-system-xLN8TV6N.mjs";
1
+ import { n as compose } from "./config-system-BVYtgrmR.mjs";
2
2
  // src/presets/capabilities/audit.ts
3
3
  /**
4
4
  * Adds bundle-size measuring (`measure-bundle`) + optional Knip (`lint:unused`) and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.360",
3
+ "version": "5.0.0-alpha.361",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -54,19 +54,19 @@
54
54
  "posthog-node": "^5.61.1",
55
55
  "tsx": "4.23.15",
56
56
  "yargs": "^18.1.0",
57
- "@theholocron/astromech": "5.0.0-alpha.360",
58
- "@theholocron/datapad": "5.0.0-alpha.360",
59
- "@theholocron/fs-utils": "^1.17.0-alpha.1",
57
+ "@theholocron/astromech": "5.0.0-alpha.361",
58
+ "@theholocron/dagobah": "5.0.0-alpha.361",
60
59
  "@theholocron/env-utils": "^1.17.0-alpha.1",
60
+ "@theholocron/datapad": "5.0.0-alpha.361",
61
+ "@theholocron/fs-utils": "^1.17.0-alpha.1",
62
+ "@theholocron/http-client": "^1.58.0-alpha.14",
61
63
  "@theholocron/git-utils": "^1.17.0-alpha.1",
62
64
  "@theholocron/github-client": "^1.58.0-alpha.14",
63
- "@theholocron/http-client": "^1.58.0-alpha.14",
65
+ "@theholocron/kyber": "5.0.0-alpha.361",
64
66
  "@theholocron/json-utils": "^1.17.0-alpha.1",
65
- "@theholocron/kyber": "5.0.0-alpha.360",
66
- "@theholocron/misc-utils": "^1.17.0-alpha.1",
67
67
  "@theholocron/observability": "^0.7.0-alpha.1",
68
- "@theholocron/pkg-utils": "^1.17.0-alpha.1",
69
- "@theholocron/dagobah": "5.0.0-alpha.360"
68
+ "@theholocron/misc-utils": "^1.17.0-alpha.1",
69
+ "@theholocron/pkg-utils": "^1.17.0-alpha.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/node": "^26",
@@ -80,9 +80,9 @@
80
80
  "typescript": "^5.9.3",
81
81
  "vitest": "^5.0.5",
82
82
  "@theholocron/eslint-config": "^8.9.0-alpha.9",
83
+ "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.9",
83
84
  "@theholocron/tsconfig": "^8.9.0-alpha.9",
84
- "@theholocron/vitest-config": "^8.9.0-alpha.9",
85
- "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.9"
85
+ "@theholocron/vitest-config": "^8.9.0-alpha.9"
86
86
  },
87
87
  "engines": {
88
88
  "node": ">=22.0.0"