@theholocron/cli 1.0.0 → 2.0.0-alpha.0

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.
Files changed (104) hide show
  1. package/LICENSE +21 -674
  2. package/README.md +17 -10
  3. package/dist/capabilities/index.d.mts +2 -0
  4. package/dist/capabilities/index.mjs +2 -0
  5. package/dist/capabilities-QjjhVlDd.mjs +43 -0
  6. package/dist/cli.d.mts +1 -0
  7. package/dist/cli.mjs +839 -0
  8. package/dist/config-DWlIfFZm.mjs +113 -0
  9. package/dist/index-DDxKXqtR.d.mts +485 -0
  10. package/dist/index.d.mts +58 -0
  11. package/dist/index.mjs +3 -0
  12. package/package.json +46 -53
  13. package/.alexignore +0 -3
  14. package/.editorconfig +0 -24
  15. package/.editorconfig-checker.json +0 -20
  16. package/.env +0 -3
  17. package/.gitattributes +0 -12
  18. package/.github/CODEOWNERS +0 -1
  19. package/.github/dependabot.yml +0 -6
  20. package/.github/labeler.yml +0 -21
  21. package/.github/workflows/bookkeeping-pr.yml +0 -32
  22. package/.github/workflows/greetings.yml +0 -32
  23. package/.github/workflows/lint.yml +0 -96
  24. package/.github/workflows/publish.yml +0 -71
  25. package/.github/workflows/review.yml +0 -72
  26. package/.github/workflows/stale.yml +0 -25
  27. package/.husky/commit-msg +0 -1
  28. package/.husky/pre-commit +0 -13
  29. package/.husky/prepare-commit-msg +0 -18
  30. package/commitlint.config.js +0 -9
  31. package/eslint.config.js +0 -9
  32. package/media/README.md +0 -11
  33. package/media/error.mp3 +0 -0
  34. package/media/success.mp3 +0 -0
  35. package/media/warning.mp3 +0 -0
  36. package/prettier.config.js +0 -11
  37. package/src/cli.ts +0 -65
  38. package/src/commands/README.md +0 -13
  39. package/src/commands/bootstrap.ts +0 -102
  40. package/src/commands/conf/README.md +0 -45
  41. package/src/commands/conf/add.ts +0 -49
  42. package/src/commands/conf/edit.ts +0 -12
  43. package/src/commands/conf/view.ts +0 -40
  44. package/src/commands/conf.ts +0 -10
  45. package/src/commands/log.ts +0 -91
  46. package/src/const.ts +0 -19
  47. package/src/tasks/README.md +0 -33
  48. package/src/tasks/find/README.md +0 -49
  49. package/src/tasks/find/find-project.example.ts +0 -23
  50. package/src/tasks/find/find-project.ts +0 -76
  51. package/src/tasks/find/index.ts +0 -1
  52. package/src/tasks/index.ts +0 -2
  53. package/src/tasks/replace/README.md +0 -61
  54. package/src/tasks/replace/index.ts +0 -1
  55. package/src/tasks/replace/replace.example.ts +0 -31
  56. package/src/tasks/replace/replace.ts +0 -95
  57. package/src/ui/README.md +0 -8
  58. package/src/ui/index.ts +0 -2
  59. package/src/ui/open/README.md +0 -58
  60. package/src/ui/open/index.ts +0 -7
  61. package/src/ui/open/open-browser.ts +0 -25
  62. package/src/ui/open/open-editor.example.ts +0 -14
  63. package/src/ui/open/open-editor.ts +0 -30
  64. package/src/ui/prompts/README.md +0 -36
  65. package/src/ui/prompts/autocomplete.prompt.ts +0 -18
  66. package/src/ui/prompts/confirm.prompt.ts +0 -21
  67. package/src/ui/prompts/index.ts +0 -17
  68. package/src/ui/prompts/input.prompt.ts +0 -15
  69. package/src/ui/prompts/search.prompt.ts +0 -33
  70. package/src/ui/prompts/select.prompt.ts +0 -17
  71. package/src/ui/prompts/types.ts +0 -8
  72. package/src/ui/prompts/utils.ts +0 -11
  73. package/src/utils/$/README.md +0 -87
  74. package/src/utils/$/command.test.ts +0 -48
  75. package/src/utils/$/command.ts +0 -21
  76. package/src/utils/$/directory.ts +0 -108
  77. package/src/utils/$/file.ts +0 -98
  78. package/src/utils/$/index.example.ts +0 -37
  79. package/src/utils/$/index.ts +0 -22
  80. package/src/utils/$/path.ts +0 -13
  81. package/src/utils/$/remove.ts +0 -47
  82. package/src/utils/$/spawn.ts +0 -26
  83. package/src/utils/$/utils.ts +0 -21
  84. package/src/utils/README.md +0 -15
  85. package/src/utils/config/README.md +0 -41
  86. package/src/utils/config/config.ts +0 -26
  87. package/src/utils/config/index.ts +0 -1
  88. package/src/utils/config/preferences.conf.ts +0 -45
  89. package/src/utils/env/README.md +0 -52
  90. package/src/utils/env/env.example.ts +0 -21
  91. package/src/utils/env/env.ts +0 -57
  92. package/src/utils/env/index.ts +0 -1
  93. package/src/utils/index.ts +0 -5
  94. package/src/utils/log/README.md +0 -117
  95. package/src/utils/log/index.ts +0 -2
  96. package/src/utils/log/log.example.ts +0 -13
  97. package/src/utils/log/log.ts +0 -58
  98. package/src/utils/log/logger.ts +0 -28
  99. package/src/utils/log/sound.ts +0 -35
  100. package/src/utils/node/README.md +0 -23
  101. package/src/utils/node/index.ts +0 -5
  102. package/src/utils/node/package.ts +0 -12
  103. package/tsconfig.json +0 -15
  104. package/yamllint.config.yml +0 -20
package/README.md CHANGED
@@ -1,17 +1,24 @@
1
- # Holocron
1
+ # `@theholocron/cli`
2
2
 
3
- The command-line client designed to support [The Holocron](http://docs.theholocron.dev).
3
+ The Holocron CLI a pluggable, capability-based orchestrator for
4
+ spinning up and operating software projects.
4
5
 
5
- ## Installation
6
+ ## Status
6
7
 
7
- ```bash
8
- npm install --global @theholocron/cli
9
- ```
8
+ **v2 alpha.** The shape is being built up per
9
+ [`.notes/tech-architecture.spec.md`](../../.notes/tech-architecture.spec.md).
10
+ Most commands aren't wired yet.
10
11
 
11
- ## Usage
12
+ ## What's in here
12
13
 
13
- <!-- fill out the usage with examples -->
14
+ - `src/capabilities/` the 14 capability interfaces that providers
15
+ implement
16
+ - `src/config.ts` — `holocron.config.json` parser + plugin resolution
17
+ - `src/cli.ts` — yargs entry, dispatches subcommands (WIP)
14
18
 
15
- ## Documentation
19
+ ## Install (when published)
16
20
 
17
- Check out [The Holocron Archive](https://docs.theholocron.dev/projects/holocron/) for more information.
21
+ ```bash
22
+ pnpm add -D @theholocron/cli
23
+ pnpm holocron --help
24
+ ```
@@ -0,0 +1,2 @@
1
+ import { $ as Tooling, A as Environments, B as ProviderApiError, C as DeploymentTarget, D as DnsRecordType, E as DnsRecord, F as LifecycleSlot, G as ResolvedCapability, H as REQUIRED_CAPABILITIES, I as NormalizedAuthUser, J as Secrets, K as Ruleset, L as Notifications, M as IssueSearchFilter, N as Issues, O as Environment, P as LifecycleResult, Q as StorageBranch, R as Observability, S as DeploymentRecord, T as Dns, U as RepoRef, V as ProviderIdentity, W as RepoSettings, X as StatusCategory, Y as Source, Z as Storage, _ as ConnectionStringOptions, a as AuthEventType, at as WebhookVerificationError, b as DeploymentProject, c as CARDINALITY, d as Cardinality, et as ToolingDoctorReport, f as CardinalityFor, g as CiRunStatus, h as CiRunFilter, i as AuthEvent, it as WebhookDashboardInfo, j as Issue, k as EnvironmentReviewer, l as CapabilityImpls, m as CiRun, n as Auth, nt as TrackerUser, o as AuthIdentity, ot as isMulti, p as Ci, q as SecretScope, r as AuthDescription, rt as Vault, s as AuthUser, t as Analytics, tt as TrackerDoctorReport, u as CapabilityKey, v as CreateAuthUserInput, w as DeploymentTrigger, x as DeploymentProjectSettings, y as Deployment, z as ParseWebhookInput } from "../index-DDxKXqtR.mjs";
2
+ 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, Environment, EnvironmentReviewer, Environments, Issue, IssueSearchFilter, Issues, LifecycleResult, LifecycleSlot, NormalizedAuthUser, Notifications, Observability, ParseWebhookInput, ProviderApiError, ProviderIdentity, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, isMulti };
@@ -0,0 +1,2 @@
1
+ import { a as isMulti, i as WebhookVerificationError, n as ProviderApiError, r as REQUIRED_CAPABILITIES, t as CARDINALITY } from "../capabilities-QjjhVlDd.mjs";
2
+ export { CARDINALITY, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, isMulti };
@@ -0,0 +1,43 @@
1
+ //#region src/capabilities/index.ts
2
+ const CARDINALITY = {
3
+ source: "single",
4
+ ci: "single",
5
+ secrets: "single",
6
+ environments: "single",
7
+ issues: "single",
8
+ deployment: "single",
9
+ storage: "single",
10
+ auth: "single",
11
+ vault: "single",
12
+ dns: "single",
13
+ tooling: "many",
14
+ notifications: "many",
15
+ analytics: "many",
16
+ observability: "many"
17
+ };
18
+ /** Vault is required; everything else is optional in the config. */
19
+ const REQUIRED_CAPABILITIES = ["vault"];
20
+ /**
21
+ * Surfaced from every capability call that hits a vendor API. Wraps
22
+ * the underlying error with `status` (HTTP) and `details` so
23
+ * orchestrators (`holocron setup`, `doctor`) can soft-skip rather
24
+ * than abort.
25
+ */
26
+ var ProviderApiError = class extends Error {
27
+ status;
28
+ details;
29
+ name = "ProviderApiError";
30
+ constructor(message, status, details) {
31
+ super(message);
32
+ this.status = status;
33
+ this.details = details;
34
+ }
35
+ };
36
+ var WebhookVerificationError = class extends Error {
37
+ name = "WebhookVerificationError";
38
+ };
39
+ function isMulti(key) {
40
+ return CARDINALITY[key] === "many";
41
+ }
42
+ //#endregion
43
+ export { isMulti as a, WebhookVerificationError as i, ProviderApiError as n, REQUIRED_CAPABILITIES as r, CARDINALITY as t };
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };