@theholocron/cli 4.18.3 → 4.19.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/cli.mjs +49 -26
- package/dist/cli.mjs.map +1 -1
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -3563,19 +3563,19 @@ var alexrc_default = { allow: [
|
|
|
3563
3563
|
] };
|
|
3564
3564
|
//#endregion
|
|
3565
3565
|
//#region src/templates/configs/alexjs/create-config.ts
|
|
3566
|
-
const { workflowHeader: workflowHeader$
|
|
3566
|
+
const { workflowHeader: workflowHeader$8 } = createHeader({ source: "packages/cli/src/templates/configs/alexjs/create-config.ts" });
|
|
3567
3567
|
function createRcConfig() {
|
|
3568
3568
|
return JSON.stringify(alexrc_default, null, 2) + "\n";
|
|
3569
3569
|
}
|
|
3570
|
-
function createIgnoreConfig() {
|
|
3571
|
-
return `${workflowHeader$
|
|
3570
|
+
function createIgnoreConfig$1() {
|
|
3571
|
+
return `${workflowHeader$8()}${alexignore_default}`;
|
|
3572
3572
|
}
|
|
3573
3573
|
//#endregion
|
|
3574
3574
|
//#region src/templates/configs/devmoji/create-config.ts
|
|
3575
|
-
const { workflowHeader: workflowHeader$
|
|
3576
|
-
function createConfig$
|
|
3575
|
+
const { workflowHeader: workflowHeader$7 } = createHeader({ source: "packages/cli/src/templates/configs/devmoji/create-config.ts" });
|
|
3576
|
+
function createConfig$6() {
|
|
3577
3577
|
return [
|
|
3578
|
-
workflowHeader$
|
|
3578
|
+
workflowHeader$7("cjs"),
|
|
3579
3579
|
`/* eslint-disable */`,
|
|
3580
3580
|
`const { defineConfig } = require("@theholocron/devmoji-config");`,
|
|
3581
3581
|
`module.exports = defineConfig();`,
|
|
@@ -3587,9 +3587,9 @@ function createConfig$5() {
|
|
|
3587
3587
|
var editorconfig_default = "root = true\n\n[*]\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\nindent_style = tab\nindent_size = 4\n\n[.gitattributes]\nindent_style = space\nindent_size = 2\n\n[*.{json,yml,yaml}]\nindent_style = space\nindent_size = 2\n\n[*.{md,mdx}]\ntrim_trailing_whitespace = false\n\n[.*{rc,ignore}]\nindent_style = space\nindent_size = 2\n";
|
|
3588
3588
|
//#endregion
|
|
3589
3589
|
//#region src/templates/configs/editorconfig/create-config.ts
|
|
3590
|
-
const { workflowHeader: workflowHeader$
|
|
3591
|
-
function createConfig$
|
|
3592
|
-
return `${workflowHeader$
|
|
3590
|
+
const { workflowHeader: workflowHeader$6 } = createHeader({ source: "packages/cli/src/templates/configs/editorconfig/create-config.ts" });
|
|
3591
|
+
function createConfig$5() {
|
|
3592
|
+
return `${workflowHeader$6()}${editorconfig_default}`;
|
|
3593
3593
|
}
|
|
3594
3594
|
//#endregion
|
|
3595
3595
|
//#region src/templates/configs/editorconfig-checker/editorconfig-checker.json
|
|
@@ -3630,7 +3630,7 @@ var editorconfig_checker_default = {
|
|
|
3630
3630
|
* options here (`Exclude`, `Disable`) are stable across releases, so pinning
|
|
3631
3631
|
* buys nothing.
|
|
3632
3632
|
*/
|
|
3633
|
-
function createConfig$
|
|
3633
|
+
function createConfig$4() {
|
|
3634
3634
|
return JSON.stringify(editorconfig_checker_default, null, 2) + "\n";
|
|
3635
3635
|
}
|
|
3636
3636
|
//#endregion
|
|
@@ -3638,7 +3638,7 @@ function createConfig$3() {
|
|
|
3638
3638
|
var pre_commit_default = "# Run GitLeaks against staged changes only — a full `gitleaks git` history\n# scan re-flags every pre-existing (already-merged) finding on every commit,\n# permanently blocking the repo once any false positive lands in history.\n# CI's super-linter GITLEAKS validator is likewise scoped to changed files.\ngitleaks protect --staged --no-banner\n\n# Exit with non-zero if secrets are detected by GitLeaks\nif [ $? -ne 0 ]; then\n echo \"Secrets detected by GitLeaks, aborting commit!\"\n exit 1\nfi\n\n# Run lint-staged with a custom config\nnpx lint-staged --config @theholocron/lint-staged-config\n";
|
|
3639
3639
|
//#endregion
|
|
3640
3640
|
//#region src/templates/configs/pre-commit/create-config.ts
|
|
3641
|
-
const { workflowHeader: workflowHeader$
|
|
3641
|
+
const { workflowHeader: workflowHeader$5 } = createHeader({ source: "packages/cli/src/templates/configs/pre-commit/create-config.ts" });
|
|
3642
3642
|
/**
|
|
3643
3643
|
* `.husky/pre-commit` — runs GitLeaks (scoped to staged changes) and
|
|
3644
3644
|
* lint-staged before every commit. Installed by `holocron setup` when hooks
|
|
@@ -3651,15 +3651,15 @@ const { workflowHeader: workflowHeader$4 } = createHeader({ source: "packages/cl
|
|
|
3651
3651
|
* doc — every future commit is permanently blocked, regardless of what's
|
|
3652
3652
|
* actually staged.
|
|
3653
3653
|
*/
|
|
3654
|
-
function createConfig$
|
|
3655
|
-
return `${workflowHeader$
|
|
3654
|
+
function createConfig$3() {
|
|
3655
|
+
return `${workflowHeader$5("shebang")}${pre_commit_default}`;
|
|
3656
3656
|
}
|
|
3657
3657
|
//#endregion
|
|
3658
3658
|
//#region src/templates/configs/pre-push/pre-push
|
|
3659
3659
|
var pre_push_default = "# Run the merge-gating checks locally before pushing — the same set CI runs.\n# Bypass once with: git push --no-verify\n\n# CI runners (semantic-release, super-linter auto-commit, bots) push without a\n# built dev environment — the hook has nothing to add there.\n[ -n \"$CI\" ] && exit 0\n\n__HOLOCRON_SCRIPT__ ci\n";
|
|
3660
3660
|
//#endregion
|
|
3661
3661
|
//#region src/templates/configs/pre-push/create-config.ts
|
|
3662
|
-
const { workflowHeader: workflowHeader$
|
|
3662
|
+
const { workflowHeader: workflowHeader$4 } = createHeader({ source: "packages/cli/src/templates/configs/pre-push/create-config.ts" });
|
|
3663
3663
|
/**
|
|
3664
3664
|
* `.husky/pre-push` — runs `holocron ci` (the merge-gating checks, in CI order)
|
|
3665
3665
|
* before every push. Installed by `holocron setup` when hooks are enabled
|
|
@@ -3668,17 +3668,32 @@ const { workflowHeader: workflowHeader$3 } = createHeader({ source: "packages/cl
|
|
|
3668
3668
|
* @param holocronScript - the command that invokes the CLI. Defaults to
|
|
3669
3669
|
* `pnpm exec holocron`; the source repo passes `node packages/cli/dist/cli.mjs`.
|
|
3670
3670
|
*/
|
|
3671
|
-
function createConfig$
|
|
3672
|
-
return `${workflowHeader$
|
|
3671
|
+
function createConfig$2(holocronScript = "pnpm exec holocron") {
|
|
3672
|
+
return `${workflowHeader$4("shebang")}${pre_push_default.replace("__HOLOCRON_SCRIPT__", holocronScript)}`;
|
|
3673
3673
|
}
|
|
3674
3674
|
//#endregion
|
|
3675
3675
|
//#region src/templates/configs/prepare-commit-msg/prepare-commit-msg
|
|
3676
3676
|
var prepare_commit_msg_default = "NAME=$(git config user.name)\nEMAIL=$(git config user.email)\n\nif [ -z \"$NAME\" ]; then\n echo \"empty git config user.name\"\n exit 1\nfi\n\nif [ -z \"$EMAIL\" ]; then\n echo \"empty git config user.email\"\n exit 1\nfi\n\ngit interpret-trailers --if-exists doNothing --trailer \\\n \"Signed-off-by: $NAME <$EMAIL>\" \\\n --in-place \"$1\"\n\nnpx devmoji -e\n";
|
|
3677
3677
|
//#endregion
|
|
3678
3678
|
//#region src/templates/configs/prepare-commit-msg/create-config.ts
|
|
3679
|
-
const { workflowHeader: workflowHeader$
|
|
3679
|
+
const { workflowHeader: workflowHeader$3 } = createHeader({ source: "packages/cli/src/templates/configs/prepare-commit-msg/create-config.ts" });
|
|
3680
|
+
function createConfig$1() {
|
|
3681
|
+
return `${workflowHeader$3("shebang")}${prepare_commit_msg_default}`;
|
|
3682
|
+
}
|
|
3683
|
+
//#endregion
|
|
3684
|
+
//#region src/templates/configs/yamllint/.yamlignore
|
|
3685
|
+
var _yamlignore_default = "pnpm-lock.yaml\n";
|
|
3686
|
+
//#endregion
|
|
3687
|
+
//#region src/templates/configs/yamllint/.yamllint.yml
|
|
3688
|
+
var _yamllint_default = "---\nextends: default\n\nignore-from-file:\n - .gitignore\n - .yamlignore\n\nrules:\n comments:\n min-spaces-from-content: 1\n require-starting-space: true\n\n comments-indentation: {}\n\n document-start:\n ignore: |\n .github/*.yml\n\n indentation:\n spaces: consistent\n indent-sequences: consistent\n\n line-length: disable\n";
|
|
3689
|
+
//#endregion
|
|
3690
|
+
//#region src/templates/configs/yamllint/create-config.ts
|
|
3691
|
+
const { workflowHeader: workflowHeader$2 } = createHeader({ source: "packages/cli/src/templates/configs/yamllint/create-config.ts" });
|
|
3680
3692
|
function createConfig() {
|
|
3681
|
-
return `${workflowHeader$2(
|
|
3693
|
+
return `${workflowHeader$2()}${_yamllint_default}`;
|
|
3694
|
+
}
|
|
3695
|
+
function createIgnoreConfig() {
|
|
3696
|
+
return `${workflowHeader$2()}${_yamlignore_default}`;
|
|
3682
3697
|
}
|
|
3683
3698
|
//#endregion
|
|
3684
3699
|
//#region src/templates/dco.yml
|
|
@@ -3688,7 +3703,7 @@ var dco_default = "allowRemediationCommits:\n individual: true\n";
|
|
|
3688
3703
|
var dependabot_default = "version: 2\nupdates:\n - package-ecosystem: npm\n directory: /\n schedule:\n interval: weekly\n commit-message:\n prefix: \"chore(deps)\"\n prefix-development: \"chore(deps-dev)\"\n groups:\n security-patches:\n applies-to: security-updates\n patterns:\n - \"*\"\n all-dependencies:\n update-types:\n - minor\n - patch\n\n - package-ecosystem: github-actions\n directory: /\n schedule:\n interval: weekly\n commit-message:\n prefix: \"chore(deps)\"\n groups:\n all-actions:\n patterns:\n - \"*\"\n";
|
|
3689
3704
|
//#endregion
|
|
3690
3705
|
//#region src/templates/labeler.yml
|
|
3691
|
-
var labeler_default = "bug:\n -
|
|
3706
|
+
var labeler_default = "bug:\n - \"^fix\"\n\nchore:\n - '^chore(?!\\(deps)'\n\nci:\n - \"^ci\"\n\ndependencies:\n - '^chore\\(deps'\n\ndocumentation:\n - \"^docs\"\n\nenhancement:\n - \"^feat\"\n\nperformance:\n - \"^perf\"\n\nrefactor:\n - \"^refactor\"\n\ntest:\n - \"^test\"\n";
|
|
3692
3707
|
//#endregion
|
|
3693
3708
|
//#region src/commands/setup/agent-prompts-data.ts
|
|
3694
3709
|
/**
|
|
@@ -4623,33 +4638,41 @@ async function runSetup(input) {
|
|
|
4623
4638
|
}));
|
|
4624
4639
|
print(formatStep(steps[steps.length - 1]));
|
|
4625
4640
|
steps.push(await runStep("source", "write .alexignore", dryRun, async () => {
|
|
4626
|
-
await source.writeRepoFile(".alexignore", createIgnoreConfig());
|
|
4641
|
+
await source.writeRepoFile(".alexignore", createIgnoreConfig$1());
|
|
4642
|
+
}));
|
|
4643
|
+
print(formatStep(steps[steps.length - 1]));
|
|
4644
|
+
steps.push(await runStep("source", "write .yamllint.yml", dryRun, async () => {
|
|
4645
|
+
await source.writeRepoFile(".yamllint.yml", createConfig());
|
|
4646
|
+
}));
|
|
4647
|
+
print(formatStep(steps[steps.length - 1]));
|
|
4648
|
+
steps.push(await runStep("source", "write .yamlignore", dryRun, async () => {
|
|
4649
|
+
await source.writeRepoFile(".yamlignore", createIgnoreConfig());
|
|
4627
4650
|
}));
|
|
4628
4651
|
print(formatStep(steps[steps.length - 1]));
|
|
4629
4652
|
steps.push(await runStep("source", "write .editorconfig", dryRun, async () => {
|
|
4630
|
-
await source.writeRepoFile(".editorconfig", createConfig$
|
|
4653
|
+
await source.writeRepoFile(".editorconfig", createConfig$5());
|
|
4631
4654
|
}));
|
|
4632
4655
|
print(formatStep(steps[steps.length - 1]));
|
|
4633
4656
|
steps.push(await runStep("source", "write .editorconfig-checker.json", dryRun, async () => {
|
|
4634
|
-
await source.writeRepoFile(".editorconfig-checker.json", createConfig$
|
|
4657
|
+
await source.writeRepoFile(".editorconfig-checker.json", createConfig$4());
|
|
4635
4658
|
}));
|
|
4636
4659
|
print(formatStep(steps[steps.length - 1]));
|
|
4637
4660
|
steps.push(await runStep("source", "write devmoji.config.cjs", dryRun, async () => {
|
|
4638
|
-
await source.writeRepoFile("devmoji.config.cjs", createConfig$
|
|
4661
|
+
await source.writeRepoFile("devmoji.config.cjs", createConfig$6());
|
|
4639
4662
|
}));
|
|
4640
4663
|
print(formatStep(steps[steps.length - 1]));
|
|
4641
4664
|
steps.push(await runStep("source", "write .husky/prepare-commit-msg", dryRun, async () => {
|
|
4642
|
-
await source.writeRepoFile(".husky/prepare-commit-msg", createConfig());
|
|
4665
|
+
await source.writeRepoFile(".husky/prepare-commit-msg", createConfig$1());
|
|
4643
4666
|
}));
|
|
4644
4667
|
print(formatStep(steps[steps.length - 1]));
|
|
4645
4668
|
if (hooksEnabled) {
|
|
4646
4669
|
steps.push(await runStep("source", "write .husky/pre-push", dryRun, async () => {
|
|
4647
|
-
await source.writeRepoFile(".husky/pre-push", createConfig$
|
|
4670
|
+
await source.writeRepoFile(".husky/pre-push", createConfig$2(config.holocronScript));
|
|
4648
4671
|
return "runs `holocron ci` before push — bypass with `git push --no-verify`";
|
|
4649
4672
|
}));
|
|
4650
4673
|
print(formatStep(steps[steps.length - 1]));
|
|
4651
4674
|
steps.push(await runStep("source", "write .husky/pre-commit", dryRun, async () => {
|
|
4652
|
-
await source.writeRepoFile(".husky/pre-commit", createConfig$
|
|
4675
|
+
await source.writeRepoFile(".husky/pre-commit", createConfig$3());
|
|
4653
4676
|
return "runs GitLeaks (staged-only) + lint-staged before commit";
|
|
4654
4677
|
}));
|
|
4655
4678
|
print(formatStep(steps[steps.length - 1]));
|