@theholocron/cli 3.43.0 → 3.44.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/dist/capabilities/index.d.mts +21 -2
- package/dist/capabilities/index.mjs +2 -1
- package/dist/cli.mjs +20 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ import { ProviderApiError } from "@theholocron/http-client";
|
|
|
12
12
|
* See `.notes/tech-architecture.spec.md` for the design narrative
|
|
13
13
|
* (status: proposed, issue: #74).
|
|
14
14
|
*/
|
|
15
|
-
type CapabilityKey = "source" | "ci" | "secrets" | "environments" | "issues" | "deployment" | "storage" | "auth" | "vault" | "dns" | "tooling" | "notifications" | "analytics" | "observability";
|
|
15
|
+
type CapabilityKey = "source" | "ci" | "secrets" | "environments" | "issues" | "deployment" | "storage" | "auth" | "vault" | "dns" | "tooling" | "notifications" | "analytics" | "observability" | "wiki";
|
|
16
16
|
type Cardinality = "single" | "many";
|
|
17
17
|
declare const CARDINALITY: {
|
|
18
18
|
readonly source: "single";
|
|
@@ -29,6 +29,7 @@ declare const CARDINALITY: {
|
|
|
29
29
|
readonly notifications: "many";
|
|
30
30
|
readonly analytics: "many";
|
|
31
31
|
readonly observability: "many";
|
|
32
|
+
readonly wiki: "single";
|
|
32
33
|
};
|
|
33
34
|
/**
|
|
34
35
|
* No capabilities are strictly required — repos without secrets (e.g. org
|
|
@@ -625,6 +626,23 @@ interface Observability extends ProviderIdentity {
|
|
|
625
626
|
alreadyExists: boolean;
|
|
626
627
|
}>;
|
|
627
628
|
}
|
|
629
|
+
interface WikiProvisionOpts {
|
|
630
|
+
/** Project display name used in the wiki title (e.g. "Holocron"). */
|
|
631
|
+
name?: string;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Engineering wiki provider.
|
|
635
|
+
*
|
|
636
|
+
* A swappable provider for publishing the `docs/decisions/` and
|
|
637
|
+
* `docs/engineering/` surfaces as a browsable, access-controlled site.
|
|
638
|
+
* Local-only providers (fern, mintlify) write config files; remote
|
|
639
|
+
* providers (github) make API calls.
|
|
640
|
+
*/
|
|
641
|
+
interface Wiki extends ProviderIdentity {
|
|
642
|
+
readonly key: "wiki";
|
|
643
|
+
/** Provision the wiki — write config files or call the provider API. */
|
|
644
|
+
provision(opts?: WikiProvisionOpts): Promise<string>;
|
|
645
|
+
}
|
|
628
646
|
interface CapabilityImpls {
|
|
629
647
|
source: Source;
|
|
630
648
|
ci: Ci;
|
|
@@ -640,10 +658,11 @@ interface CapabilityImpls {
|
|
|
640
658
|
notifications: Notifications;
|
|
641
659
|
analytics: Analytics;
|
|
642
660
|
observability: Observability;
|
|
661
|
+
wiki: Wiki;
|
|
643
662
|
}
|
|
644
663
|
type CardinalityFor<K extends CapabilityKey> = (typeof CARDINALITY)[K];
|
|
645
664
|
/** Resolved runtime shape: single → one impl; many → array. */
|
|
646
665
|
type ResolvedCapability<K extends CapabilityKey> = CardinalityFor<K> extends "many" ? CapabilityImpls[K][] : CapabilityImpls[K];
|
|
647
666
|
declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
|
|
648
667
|
//#endregion
|
|
649
|
-
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, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, isMulti };
|
|
668
|
+
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, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, isMulti };
|
package/dist/cli.mjs
CHANGED
|
@@ -137,7 +137,8 @@ const CARDINALITY = {
|
|
|
137
137
|
tooling: "many",
|
|
138
138
|
notifications: "many",
|
|
139
139
|
analytics: "many",
|
|
140
|
-
observability: "many"
|
|
140
|
+
observability: "many",
|
|
141
|
+
wiki: "single"
|
|
141
142
|
};
|
|
142
143
|
/**
|
|
143
144
|
* No capabilities are strictly required — repos without secrets (e.g. org
|
|
@@ -3280,6 +3281,9 @@ var test_default$1 = "name: Test\n\non: # yamllint disable-line rule:truthy\n p
|
|
|
3280
3281
|
//#region src/commands/workflows/typecheck.yml
|
|
3281
3282
|
var typecheck_default$1 = "name: Typecheck\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: typecheck-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n typecheck:\n name: Typecheck\n uses: theholocron/.github/.github/workflows/typecheck.yml@main\n secrets: inherit\n";
|
|
3282
3283
|
//#endregion
|
|
3284
|
+
//#region src/commands/workflows/wiki.yml
|
|
3285
|
+
var wiki_default$1 = "name: Wiki\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\nconcurrency:\n group: ${{ github.event_name == 'pull_request' && format('wiki-preview-{0}', github.event.pull_request.number) || 'wiki' }}\n cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n\npermissions:\n contents: read\n\njobs:\n publish:\n name: Publish\n if: ${{ github.event_name != 'pull_request' }}\n uses: theholocron/.github/.github/workflows/wiki.yml@main\n secrets: inherit\n\n preview:\n name: Preview\n if: ${{ github.event_name == 'pull_request' }}\n uses: theholocron/.github/.github/workflows/wiki.yml@main\n with:\n preview: true\n preview-id: pr-${{ github.event.pull_request.number }}\n secrets: inherit\n";
|
|
3286
|
+
//#endregion
|
|
3283
3287
|
//#region src/commands/setup-workflows.ts
|
|
3284
3288
|
/**
|
|
3285
3289
|
* Header prepended to every auto-generated workflow thin caller.
|
|
@@ -3321,7 +3325,8 @@ const WORKFLOW_TEMPLATES = {
|
|
|
3321
3325
|
dependencies: dependencies_default$1,
|
|
3322
3326
|
bookkeeping: bookkeeping_default$1,
|
|
3323
3327
|
audit: audit_default$1,
|
|
3324
|
-
deploy: deploy_default$1
|
|
3328
|
+
deploy: deploy_default$1,
|
|
3329
|
+
wiki: wiki_default$1
|
|
3325
3330
|
};
|
|
3326
3331
|
const KNOWN_WORKFLOWS = new Set(Object.keys(WORKFLOW_TEMPLATES));
|
|
3327
3332
|
/**
|
|
@@ -4254,6 +4259,14 @@ async function runSetup(input) {
|
|
|
4254
4259
|
print(formatStep(steps[steps.length - 1]));
|
|
4255
4260
|
}
|
|
4256
4261
|
}
|
|
4262
|
+
if (loader.has("wiki")) {
|
|
4263
|
+
const wiki = loader.get("wiki");
|
|
4264
|
+
print(style.step("wiki"));
|
|
4265
|
+
steps.push(await runStep("wiki", "provision wiki config", dryRun, async () => {
|
|
4266
|
+
return await wiki.provision({ name: config.name });
|
|
4267
|
+
}));
|
|
4268
|
+
print(formatStep(steps[steps.length - 1]));
|
|
4269
|
+
}
|
|
4257
4270
|
if (loader.has("deployment")) {
|
|
4258
4271
|
const deploy = loader.get("deployment");
|
|
4259
4272
|
print(style.step("deployment"));
|
|
@@ -5358,6 +5371,9 @@ var test_default = "name: Test\n\non: # yamllint disable-line rule:truthy\n wor
|
|
|
5358
5371
|
//#region src/templates/workflows/typecheck.yml
|
|
5359
5372
|
var typecheck_default = "name: Typecheck\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n TURBO_TOKEN:\n required: false\n\njobs:\n typecheck:\n name: tsc --noEmit\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm typecheck\n name: Type check\n\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [typecheck]\n steps:\n - name: Check job statuses\n run: |\n if [[ \"$RESULTS\" == *\"failure\"* ]] || [[ \"$RESULTS\" == *\"cancelled\"* ]]; then\n exit 1\n fi\n env:\n RESULTS: ${{ join(needs.*.result, ',') }}\n";
|
|
5360
5373
|
//#endregion
|
|
5374
|
+
//#region src/templates/workflows/wiki.yml
|
|
5375
|
+
var wiki_default = "name: Wiki\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n fern-version:\n description: >\n Fern CLI version to install. Pin this to avoid breaking changes when\n Fern updates their config schema.\n type: string\n required: false\n default: \"5.35.4\"\n preview:\n description: >\n When true, publishes a preview instead of production.\n Requires preview-id to be set.\n type: boolean\n required: false\n default: false\n preview-id:\n description: >\n Stable ID for the preview URL. The preview is accessible at\n {org}-preview-{id}.docs.buildwithfern.com. Use the PR number\n (e.g. \"pr-123\") so the same URL is reused on every push to\n the branch.\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_FERN_TOKEN:\n required: true\n\njobs:\n publish:\n name: ${{ inputs.preview && 'Preview' || 'Publish' }} to Fern\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - name: Install Fern CLI\n run: npm install -g \"fern-api@$FERN_VERSION\"\n env:\n FERN_VERSION: ${{ inputs.fern-version }}\n\n - name: Publish docs\n if: ${{ !inputs.preview }}\n run: fern generate --docs\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN }}\n\n - name: Preview docs\n if: ${{ inputs.preview && inputs.preview-id != '' }}\n run: fern generate --docs --preview --id \"$PREVIEW_ID\"\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN }}\n PREVIEW_ID: ${{ inputs.preview-id }}\n";
|
|
5376
|
+
//#endregion
|
|
5361
5377
|
//#region src/templates/index.ts
|
|
5362
5378
|
/**
|
|
5363
5379
|
* All reusable workflow and composite action content bundled as string
|
|
@@ -5392,7 +5408,8 @@ const REUSABLE_WORKFLOWS = {
|
|
|
5392
5408
|
"sync-github": sync_github_default,
|
|
5393
5409
|
sync: sync_default,
|
|
5394
5410
|
test: test_default,
|
|
5395
|
-
typecheck: typecheck_default
|
|
5411
|
+
typecheck: typecheck_default,
|
|
5412
|
+
wiki: wiki_default
|
|
5396
5413
|
};
|
|
5397
5414
|
const WORKFLOW_TEMPLATE_PROPERTIES = { bookkeeping: JSON.stringify({
|
|
5398
5415
|
name: "Bookkeeping",
|