@theholocron/cli 3.5.3 → 3.6.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.
- package/README.md +1 -1
- package/dist/capabilities/index.d.mts +21 -1
- package/dist/cli.mjs +38 -4
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +35 -2
- package/dist/index.mjs +9 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -157,6 +157,26 @@ interface Source extends ProviderIdentity {
|
|
|
157
157
|
* Optional — providers that don't support setting a homepage omit this.
|
|
158
158
|
*/
|
|
159
159
|
syncHomepage?(homepage: string): Promise<string>;
|
|
160
|
+
/**
|
|
161
|
+
* Enable or update GitHub Pages for the repository.
|
|
162
|
+
* Idempotent: POST to create, PUT to update existing settings.
|
|
163
|
+
* Requires HOLOCRON_DEPLOY_TOKEN (pages:write + repo scope) — passed
|
|
164
|
+
* explicitly because it is a different PAT from the main admin token.
|
|
165
|
+
* Optional — providers without a Pages concept omit this.
|
|
166
|
+
*/
|
|
167
|
+
configurePages?(config: PagesConfig, token: string): Promise<void>;
|
|
168
|
+
}
|
|
169
|
+
interface PagesConfig {
|
|
170
|
+
/** GitHub Pages build source. */
|
|
171
|
+
build: "workflow" | "branch";
|
|
172
|
+
/**
|
|
173
|
+
* Custom domain / CNAME (e.g. "docs.theholocron.dev").
|
|
174
|
+
* When set and `homepage` is absent in holocron.config, setup derives
|
|
175
|
+
* homepage as `https://{domain}/`.
|
|
176
|
+
*/
|
|
177
|
+
domain?: string;
|
|
178
|
+
/** Enforce HTTPS. Only effective once the custom domain is DNS-verified. */
|
|
179
|
+
https?: boolean;
|
|
160
180
|
}
|
|
161
181
|
type CiRunStatus = "queued" | "in_progress" | "completed" | "cancelled" | "failure" | "success" | "skipped";
|
|
162
182
|
interface CiRun {
|
|
@@ -571,4 +591,4 @@ type CardinalityFor<K extends CapabilityKey> = (typeof CARDINALITY)[K];
|
|
|
571
591
|
type ResolvedCapability<K extends CapabilityKey> = CardinalityFor<K> extends "many" ? CapabilityImpls[K][] : CapabilityImpls[K];
|
|
572
592
|
declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
|
|
573
593
|
//#endregion
|
|
574
|
-
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, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, isMulti };
|
|
594
|
+
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, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, isMulti };
|
package/dist/cli.mjs
CHANGED
|
@@ -248,17 +248,24 @@ function resolveConfig(raw) {
|
|
|
248
248
|
providers[key] = resolveEntry(key, entry);
|
|
249
249
|
}
|
|
250
250
|
for (const required of REQUIRED_CAPABILITIES) if (!providers[required]) throw new ConfigError(`required capability \`${required}\` is missing from providers`);
|
|
251
|
+
let docs;
|
|
252
|
+
if (raw.docs !== void 0) {
|
|
253
|
+
if (!raw.docs.build) throw new ConfigError("`docs.build` is required when `docs` is set");
|
|
254
|
+
docs = raw.docs;
|
|
255
|
+
}
|
|
256
|
+
const homepage = raw.homepage ?? (docs?.domain ? `https://${docs.domain}/` : void 0);
|
|
251
257
|
return {
|
|
252
258
|
name: raw.name,
|
|
253
259
|
description: raw.description,
|
|
254
|
-
homepage
|
|
260
|
+
homepage,
|
|
255
261
|
repo: raw.repo,
|
|
256
262
|
workflows: raw.workflows,
|
|
257
263
|
providers,
|
|
258
264
|
apps: raw.apps ?? [],
|
|
259
265
|
doctor: raw.doctor ?? {},
|
|
260
266
|
agent: raw.agent,
|
|
261
|
-
skills: raw.skills
|
|
267
|
+
skills: raw.skills,
|
|
268
|
+
docs
|
|
262
269
|
};
|
|
263
270
|
}
|
|
264
271
|
//#endregion
|
|
@@ -2629,7 +2636,7 @@ function editorconfigContent() {
|
|
|
2629
2636
|
`indent_style = space`,
|
|
2630
2637
|
`indent_size = 2`,
|
|
2631
2638
|
``,
|
|
2632
|
-
`[*.md]`,
|
|
2639
|
+
`[*.{md,mdx}]`,
|
|
2633
2640
|
`trim_trailing_whitespace = false`,
|
|
2634
2641
|
`indent_style = space`,
|
|
2635
2642
|
`indent_size = 2`,
|
|
@@ -2713,7 +2720,11 @@ const EDITORCONFIG_CHECKER_CONFIG = JSON.stringify({
|
|
|
2713
2720
|
IgnoreDefaults: false,
|
|
2714
2721
|
SpacesAfterTabs: false,
|
|
2715
2722
|
NoColor: false,
|
|
2716
|
-
Exclude: [
|
|
2723
|
+
Exclude: [
|
|
2724
|
+
"(^|.+/)LICENSE$",
|
|
2725
|
+
"^public/.*",
|
|
2726
|
+
"\\.mdx$"
|
|
2727
|
+
],
|
|
2717
2728
|
AllowedContentTypes: [],
|
|
2718
2729
|
PassedFiles: [],
|
|
2719
2730
|
Disable: {
|
|
@@ -3169,6 +3180,29 @@ async function runSetup(input) {
|
|
|
3169
3180
|
print(formatStep(steps[steps.length - 1]));
|
|
3170
3181
|
}
|
|
3171
3182
|
}
|
|
3183
|
+
if (loader.has("source") && config.docs) {
|
|
3184
|
+
const source = loader.get("source");
|
|
3185
|
+
const deployToken = process.env.HOLOCRON_DEPLOY_TOKEN;
|
|
3186
|
+
print(style.step("docs"));
|
|
3187
|
+
if (!deployToken) {
|
|
3188
|
+
steps.push({
|
|
3189
|
+
capability: "source",
|
|
3190
|
+
step: "configure GitHub Pages",
|
|
3191
|
+
status: "skip",
|
|
3192
|
+
message: "HOLOCRON_DEPLOY_TOKEN not set — skipping Pages setup"
|
|
3193
|
+
});
|
|
3194
|
+
print(formatStep(steps[steps.length - 1]));
|
|
3195
|
+
} else if (source.configurePages) {
|
|
3196
|
+
steps.push(await runStep("source", "configure GitHub Pages", dryRun, async () => {
|
|
3197
|
+
await source.configurePages(config.docs, deployToken);
|
|
3198
|
+
const parts = [config.docs.build];
|
|
3199
|
+
if (config.docs.domain) parts.push(`domain: ${config.docs.domain}`);
|
|
3200
|
+
if (config.docs.https) parts.push("https: enforced");
|
|
3201
|
+
return parts.join(", ");
|
|
3202
|
+
}));
|
|
3203
|
+
print(formatStep(steps[steps.length - 1]));
|
|
3204
|
+
}
|
|
3205
|
+
}
|
|
3172
3206
|
if (loader.has("deployment")) {
|
|
3173
3207
|
const deploy = loader.get("deployment");
|
|
3174
3208
|
print(style.step("deployment"));
|