@theholocron/cli 2.0.0-alpha.40 → 2.0.0-alpha.42

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.
@@ -66,6 +66,11 @@ interface RepoRef {
66
66
  name: string;
67
67
  defaultBranch: string;
68
68
  }
69
+ interface LabelDef {
70
+ readonly name: string;
71
+ readonly color: string;
72
+ readonly description: string;
73
+ }
69
74
  interface Source extends ProviderIdentity {
70
75
  readonly key: "source";
71
76
  /** Auth sanity-check. Throws ProviderApiError on auth failure. */
@@ -116,6 +121,12 @@ interface Source extends ProviderIdentity {
116
121
  * (e.g. `.github/dependabot.yml`).
117
122
  */
118
123
  writeRepoFile(path: string, contents: string): Promise<void>;
124
+ /**
125
+ * Idempotently sync repo labels to a canonical set. Creates missing
126
+ * labels, patches color/description drift, deletes stale labels.
127
+ * Optional — providers that have no label concept omit this.
128
+ */
129
+ syncLabels?(canonical: ReadonlyArray<LabelDef>, stale: ReadonlyArray<string>): Promise<string>;
119
130
  }
120
131
  type CiRunStatus = "queued" | "in_progress" | "completed" | "cancelled" | "failure" | "success" | "skipped";
121
132
  interface CiRun {
@@ -528,4 +539,4 @@ type CardinalityFor<K extends CapabilityKey> = (typeof CARDINALITY)[K];
528
539
  type ResolvedCapability<K extends CapabilityKey> = CardinalityFor<K> extends "many" ? CapabilityImpls[K][] : CapabilityImpls[K];
529
540
  declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
530
541
  //#endregion
531
- 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, 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 };
542
+ 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, Issue, IssueSearchFilter, Issues, LabelDef, 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 };
package/dist/cli.mjs CHANGED
@@ -971,6 +971,9 @@ jobs:
971
971
 
972
972
  - uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
973
973
  if: \${{ hashFiles(inputs.configuration-path || '.github/labeler.yml') != '' }}
974
+ # v3.4 bundles Node 20; allow it to run under Actions' current default.
975
+ env:
976
+ ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
974
977
  with:
975
978
  # Fall back to default path when triggered directly (not via workflow_call)
976
979
  # because inputs.* defaults only apply on workflow_call events.
@@ -3743,6 +3746,100 @@ const ALEX_CONFIG = JSON.stringify({ allow: [
3743
3746
  "husky",
3744
3747
  "period"
3745
3748
  ] }, null, 2) + "\n";
3749
+ const CANONICAL_LABELS = [
3750
+ {
3751
+ name: "bug",
3752
+ color: "d73a4a",
3753
+ description: "Something isn't working"
3754
+ },
3755
+ {
3756
+ name: "chore",
3757
+ color: "ededed",
3758
+ description: "Maintenance, no user-facing change"
3759
+ },
3760
+ {
3761
+ name: "ci",
3762
+ color: "0075ca",
3763
+ description: "CI/CD pipeline changes"
3764
+ },
3765
+ {
3766
+ name: "dependencies",
3767
+ color: "0366d6",
3768
+ description: "Dependency update"
3769
+ },
3770
+ {
3771
+ name: "documentation",
3772
+ color: "0075ca",
3773
+ description: "Documentation only"
3774
+ },
3775
+ {
3776
+ name: "duplicate",
3777
+ color: "cfd3d7",
3778
+ description: "Already reported"
3779
+ },
3780
+ {
3781
+ name: "enhancement",
3782
+ color: "a2eeef",
3783
+ description: "New feature or request"
3784
+ },
3785
+ {
3786
+ name: "good first issue",
3787
+ color: "7057ff",
3788
+ description: "Good for newcomers"
3789
+ },
3790
+ {
3791
+ name: "help wanted",
3792
+ color: "008672",
3793
+ description: "Extra attention needed"
3794
+ },
3795
+ {
3796
+ name: "invalid",
3797
+ color: "e4e669",
3798
+ description: "Doesn't seem right"
3799
+ },
3800
+ {
3801
+ name: "performance",
3802
+ color: "fbca04",
3803
+ description: "Performance improvement"
3804
+ },
3805
+ {
3806
+ name: "question",
3807
+ color: "d876e3",
3808
+ description: "Further information requested"
3809
+ },
3810
+ {
3811
+ name: "refactor",
3812
+ color: "cfd3d7",
3813
+ description: "Code restructuring"
3814
+ },
3815
+ {
3816
+ name: "released",
3817
+ color: "ededed",
3818
+ description: "Included in a release"
3819
+ },
3820
+ {
3821
+ name: "test",
3822
+ color: "bfd4f2",
3823
+ description: "Test-related changes"
3824
+ },
3825
+ {
3826
+ name: "triage",
3827
+ color: "e4e669",
3828
+ description: "Needs investigation"
3829
+ },
3830
+ {
3831
+ name: "wontfix",
3832
+ color: "ffffff",
3833
+ description: "Won't be addressed"
3834
+ }
3835
+ ];
3836
+ const STALE_LABELS = [
3837
+ "github_actions",
3838
+ "javascript",
3839
+ "autorelease: pending",
3840
+ "autorelease: tagged",
3841
+ "released on @alpha"
3842
+ ];
3746
3843
  function labelerConfig() {
3747
3844
  return [
3748
3845
  `# AUTO-GENERATED — do not edit directly.`,
@@ -3754,6 +3851,12 @@ function labelerConfig() {
3754
3851
  `bug:`,
3755
3852
  ` - '^fix'`,
3756
3853
  ``,
3854
+ `chore:`,
3855
+ ` - '^chore(?!\\(deps)'`,
3856
+ ``,
3857
+ `ci:`,
3858
+ ` - '^ci'`,
3859
+ ``,
3757
3860
  `dependencies:`,
3758
3861
  ` - '^chore\\(deps'`,
3759
3862
  ``,
@@ -3763,8 +3866,14 @@ function labelerConfig() {
3763
3866
  `enhancement:`,
3764
3867
  ` - '^feat'`,
3765
3868
  ``,
3766
- `github_actions:`,
3767
- ` - '^ci'`,
3869
+ `performance:`,
3870
+ ` - '^perf'`,
3871
+ ``,
3872
+ `refactor:`,
3873
+ ` - '^refactor'`,
3874
+ ``,
3875
+ `test:`,
3876
+ ` - '^test'`,
3768
3877
  ``
3769
3878
  ].join("\n");
3770
3879
  }
@@ -4022,6 +4131,12 @@ async function runSetup(input) {
4022
4131
  await source.writeRepoFile(".editorconfig-checker.json", EDITORCONFIG_CHECKER_CONFIG);
4023
4132
  }));
4024
4133
  print(formatStep(steps[steps.length - 1]));
4134
+ if (source.syncLabels) {
4135
+ steps.push(await runStep("source", "sync labels", dryRun, async () => {
4136
+ return source.syncLabels(CANONICAL_LABELS, STALE_LABELS);
4137
+ }));
4138
+ print(formatStep(steps[steps.length - 1]));
4139
+ }
4025
4140
  }
4026
4141
  if (loader.has("environments")) {
4027
4142
  const envs = loader.get("environments");
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { 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, 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 } from "./capabilities/index.mjs";
1
+ import { 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, Issue, IssueSearchFilter, Issues, LabelDef, 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 } from "./capabilities/index.mjs";
2
2
  import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
3
3
 
4
4
  //#region src/auth-resolver.d.ts
@@ -190,4 +190,4 @@ interface LoadedConfig {
190
190
  */
191
191
  declare function loadConfig(cwd: string): Promise<LoadedConfig>;
192
192
  //#endregion
193
- export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, DoctorConfig, EnsureResult, Environment, EnvironmentReviewer, Environments, HolocronConfig, Issue, IssueSearchFilter, Issues, LifecycleResult, LifecycleSlot, LoadedConfig, MultiEntry, NormalizedAuthUser, Notifications, Observability, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoPolicyConfig, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, createResolveToken, createRestClient, defineConfig, deleteToken, getToken, isMulti, listStoredProviders, loadConfig, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
193
+ export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, DoctorConfig, EnsureResult, Environment, EnvironmentReviewer, Environments, HolocronConfig, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LoadedConfig, MultiEntry, NormalizedAuthUser, Notifications, Observability, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoPolicyConfig, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, createResolveToken, createRestClient, defineConfig, deleteToken, getToken, isMulti, listStoredProviders, loadConfig, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "2.0.0-alpha.40",
3
+ "version": "2.0.0-alpha.42",
4
4
  "description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
6
6
  "bugs": "https://github.com/theholocron/holocron/issues",