@theholocron/cli 5.0.0-alpha.11 → 5.0.0-alpha.110

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.
@@ -136,10 +136,11 @@ interface Source extends ProviderIdentity {
136
136
  */
137
137
  syncLabels?(canonical: ReadonlyArray<LabelDef>, stale: ReadonlyArray<string>): Promise<string>;
138
138
  /**
139
- * Set org-level custom property values on the repo.
139
+ * Set org-level custom property values on the repo. `string[]` for
140
+ * `multi_select` properties, plain `string` for everything else.
140
141
  * Optional — providers that don't support custom properties omit this.
141
142
  */
142
- syncProperties?(values: Record<string, string>): Promise<string>;
143
+ syncProperties?(values: Record<string, string | string[]>): Promise<string>;
143
144
  /**
144
145
  * Replace the repo's topic set with the supplied list.
145
146
  * Optional — providers that don't support topics omit this.
@@ -363,9 +364,35 @@ interface DeploymentRecord {
363
364
  target?: DeploymentTrigger;
364
365
  status: "queued" | "building" | "ready" | "error" | "cancelled";
365
366
  createdAt?: string;
367
+ /** The provider's own reason when `status` is `"error"` (e.g. Vercel's `Command "npm install" exited with 1`). */
368
+ errorMessage?: string;
369
+ }
370
+ /** Config for `Deployment.deployFunction()` — source files, not a Git ref. */
371
+ interface DeployFunctionConfig {
372
+ /**
373
+ * Files to deploy, keyed by path relative to the project root (e.g.
374
+ * `"api/webhook.js"`, `"package.json"`). Content is plain text — the
375
+ * provider handles any wire-format encoding.
376
+ */
377
+ files: Record<string, string>;
378
+ /**
379
+ * Named deployment target. Omit for a preview deployment — same
380
+ * semantics as `triggerDeployment`'s `target`.
381
+ */
382
+ target?: DeploymentTrigger;
383
+ }
384
+ interface DeployFunctionResult {
385
+ deploymentId: string;
386
+ url: string;
366
387
  }
367
388
  interface Deployment extends ProviderIdentity {
368
389
  readonly key: "deployment";
390
+ /**
391
+ * Custom domain declared in the deployment provider's configuration.
392
+ * `holocron setup` attaches it to the configured project and hands any
393
+ * returned verification record to the `dns` capability.
394
+ */
395
+ readonly domain?: string;
369
396
  listProjects(): Promise<DeploymentProject[]>;
370
397
  /** Create if missing, otherwise return existing. Idempotent. */
371
398
  ensureProject(input: {
@@ -389,6 +416,16 @@ interface Deployment extends ProviderIdentity {
389
416
  target?: DeploymentTrigger;
390
417
  }): Promise<DeploymentRecord>;
391
418
  getDeployment(deploymentId: string): Promise<DeploymentRecord>;
419
+ /**
420
+ * Deploy (or update) a project directly from source files, bypassing
421
+ * Git entirely — the non-git counterpart to `triggerDeployment`, for a
422
+ * consumer with no repo to link (a webhook receiver shipped as an npm
423
+ * package, for instance, rather than deployed from its own Git
424
+ * history). `projectId` may be a project name for providers that
425
+ * accept either. Optional — providers without a files-based deploy API
426
+ * omit this (e.g. Cloudflare Pages, git-source only today).
427
+ */
428
+ deployFunction?(projectId: string, config: DeployFunctionConfig): Promise<DeployFunctionResult>;
392
429
  /**
393
430
  * List preview deployments for a specific branch alias (e.g. "repo-pr-42").
394
431
  * Optional — providers that don't support listing by branch omit this.
@@ -401,10 +438,18 @@ interface Deployment extends ProviderIdentity {
401
438
  deletePreviewDeployments?(projectId: string, deploymentIds: string[]): Promise<number>;
402
439
  /**
403
440
  * Add a custom domain (or wildcard) to the project. Idempotent — no-op
404
- * when the domain is already present. Optional: providers without a custom
405
- * domain API omit this (e.g. Vercel manages domains separately).
441
+ * when the domain is already present. Optional: providers without a
442
+ * custom domain API omit this.
443
+ *
444
+ * Returns the DNS record needed to finish verification — `null` when
445
+ * the domain is already verified, or when the provider's API doesn't
446
+ * surface DNS-challenge details at all (e.g. Cloudflare Pages, whose
447
+ * custom-domain flow doesn't expose the same per-request verification
448
+ * handshake Vercel's does). Callers hand a non-null result straight
449
+ * to `dns.upsertRecord(result.zone, result.record)` — the exact
450
+ * pattern `setup` already uses for `Wiki.dnsRecord()`.
406
451
  */
407
- ensureCustomDomain?(projectId: string, hostname: string): Promise<void>;
452
+ ensureCustomDomain?(projectId: string, hostname: string): Promise<DnsRecordRequest | null>;
408
453
  }
409
454
  interface StorageBranch {
410
455
  id: string;
@@ -572,6 +617,17 @@ interface DnsRecord {
572
617
  priority?: number;
573
618
  proxied?: boolean;
574
619
  }
620
+ /**
621
+ * A DNS record a capability wants created, plus which zone it belongs
622
+ * to — the shape `Wiki.dnsRecord()` and `Deployment.ensureCustomDomain()`
623
+ * both hand off to `Dns.upsertRecord()`. Not tied to either capability;
624
+ * any provider that needs "here's a record, go create it" returns this.
625
+ */
626
+ interface DnsRecordRequest {
627
+ /** Zone apex passed as the first argument to `dns.upsertRecord`. */
628
+ zone: string;
629
+ record: DnsRecord;
630
+ }
575
631
  interface Dns extends ProviderIdentity {
576
632
  readonly key: "dns";
577
633
  listRecords(domain: string): Promise<DnsRecord[]>;
@@ -650,18 +706,6 @@ interface WikiProvisionOpts {
650
706
  /** Project display name used in the wiki title (e.g. "Holocron"). */
651
707
  name?: string;
652
708
  }
653
- /**
654
- * DNS record that `setup` should create for a wiki custom domain.
655
- * Returned by `Wiki.dnsRecord()` when a custom domain is configured.
656
- */
657
- interface WikiDnsRecord {
658
- /** Zone apex passed as the first argument to `dns.upsertRecord`. */
659
- zone: string;
660
- /** Full hostname for the CNAME (e.g. "wiki.theholocron.dev"). */
661
- cname: string;
662
- /** CNAME target (e.g. "holocron.docs.buildwithfern.com"). */
663
- target: string;
664
- }
665
709
  /**
666
710
  * Reverse-proxy configuration returned by `Wiki.proxyConfig()`.
667
711
  * Used by `setup` to deploy a Worker that forwards traffic to the wiki
@@ -690,7 +734,7 @@ interface Wiki extends ProviderIdentity {
690
734
  * Returns null when no custom domain is set.
691
735
  * Called by `setup` to provision the CNAME via the `dns` capability.
692
736
  */
693
- dnsRecord?(): WikiDnsRecord | null;
737
+ dnsRecord?(): DnsRecordRequest | null;
694
738
  /**
695
739
  * Reverse-proxy config when the wiki provider requires a Worker-level
696
740
  * proxy in addition to the CNAME. Returns null when no proxy is needed.
@@ -698,12 +742,34 @@ interface Wiki extends ProviderIdentity {
698
742
  */
699
743
  proxyConfig?(): WikiProxyConfig | null;
700
744
  }
745
+ /** Config for `Workers.deployScript()` — an arbitrary Worker, not a generated reverse-proxy. */
746
+ interface DeployScriptConfig {
747
+ /** The full Worker script source — a single ES module (`export default { fetch(...) {...} }`). */
748
+ code: string;
749
+ /**
750
+ * Secret bindings — `env.<name>` in the deployed Worker. Values are
751
+ * write-only; the provider never echoes them back, here or anywhere else.
752
+ */
753
+ secrets?: Record<string, string>;
754
+ /**
755
+ * Route pattern(s) this Worker should serve (e.g.
756
+ * `"sentinel.theholocron.dev/*"`). Omit for a Worker reached only via
757
+ * its `*.workers.dev` URL.
758
+ */
759
+ routes?: string[];
760
+ }
761
+ interface DeployScriptResult {
762
+ /** The deployed script's name at the provider. */
763
+ scriptName: string;
764
+ }
701
765
  /**
702
- * Edge Worker / reverse-proxy management capability.
766
+ * Edge Worker management capability.
703
767
  *
704
- * Deploys and manages Worker scripts that proxy traffic to a configured
705
- * target. Used by `setup` to wire wiki custom-domain proxies when the
706
- * wiki provider requires a Worker in addition to the CNAME.
768
+ * Deploys and manages Worker scripts. `upsertProxy` is the existing,
769
+ * narrower case `setup` uses to wire wiki custom-domain reverse-proxies;
770
+ * `deployScript` is the general case — any Worker, any code, its own
771
+ * secrets — for a consumer that isn't a reverse-proxy (a webhook
772
+ * receiver, for instance).
707
773
  */
708
774
  interface Workers extends ProviderIdentity {
709
775
  readonly key: "workers";
@@ -713,6 +779,8 @@ interface Workers extends ProviderIdentity {
713
779
  * `config.headers` on each request.
714
780
  */
715
781
  upsertProxy(hostname: string, config: WikiProxyConfig): Promise<void>;
782
+ /** Deploy (or update) an arbitrary Worker script, optionally with secrets and routes. */
783
+ deployScript(name: string, config: DeployScriptConfig): Promise<DeployScriptResult>;
716
784
  }
717
785
  interface CapabilityImpls {
718
786
  source: Source;
@@ -738,4 +806,4 @@ type CardinalityFor<K extends CapabilityKey> = (typeof CARDINALITY)[K];
738
806
  type ResolvedCapability<K extends CapabilityKey> = CardinalityFor<K> extends "many" ? CapabilityImpls[K][] : CapabilityImpls[K];
739
807
  declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
740
808
  //#endregion
741
- export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti };
809
+ export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.11",
3
+ "version": "5.0.0-alpha.110",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -41,15 +41,18 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "@axiomhq/pino": "^2.0.0",
44
+ "@commitlint/lint": "^21.2.3",
45
+ "@commitlint/load": "^21.2.3",
46
+ "@commitlint/types": "^21.2.3",
44
47
  "@inquirer/prompts": "^8.5.2",
45
48
  "@inquirer/search": "^4.3.3",
46
49
  "@napi-rs/keyring": "^1.3.0",
47
50
  "@sentry/node": "^10.70.0",
48
51
  "@theholocron/components-doc": "^1.6.0",
49
52
  "@theholocron/env-utils": "^1.6.0",
50
- "@theholocron/github-client": "^1.14.2",
51
- "@theholocron/http-client": "^1.14.2",
52
- "@theholocron/observability": "^0.3.0",
53
+ "@theholocron/github-client": "^1.36.0",
54
+ "@theholocron/http-client": "^1.36.0",
55
+ "@theholocron/observability": "^0.4.0",
53
56
  "@theholocron/registry-doc": "^1.12.0",
54
57
  "chalk": "^6.0.0",
55
58
  "ora": "^9.4.1",
@@ -57,13 +60,15 @@
57
60
  "pino-pretty": "^13.1.3",
58
61
  "posthog-node": "^5.51.6",
59
62
  "yargs": "^18.1.0",
60
- "@theholocron/datapad": "5.0.0-alpha.11",
61
- "@theholocron/astromech": "5.0.0-alpha.11"
63
+ "@theholocron/astromech": "5.0.0-alpha.110",
64
+ "@theholocron/datapad": "5.0.0-alpha.110"
62
65
  },
63
66
  "devDependencies": {
64
- "@theholocron/eslint-config": "^8.0.0",
65
- "@theholocron/tsconfig": "^8.0.0",
66
- "@theholocron/vitest-config": "^8.0.0",
67
+ "@commitlint/config-conventional": "^21.2.3",
68
+ "@theholocron/commitlint-config": "^8.4.5",
69
+ "@theholocron/eslint-config": "^8.6.0",
70
+ "@theholocron/tsconfig": "^8.4.5",
71
+ "@theholocron/vitest-config": "^8.4.5",
67
72
  "@types/node": "^26",
68
73
  "@types/yargs": "^17.0.35",
69
74
  "@vitest/coverage-v8": "^4.1.11",
@@ -75,7 +80,7 @@
75
80
  "tsx": "4.23.12",
76
81
  "typescript": "^5.9.3",
77
82
  "vitest": "^4.1.11",
78
- "@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.11"
83
+ "@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.110"
79
84
  },
80
85
  "engines": {
81
86
  "node": ">=22.0.0"