@theholocron/astromech 5.0.0-alpha.459 → 5.0.0-alpha.460
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/index.d.mts +4 -0
- package/dist/index.mjs +14 -3
- package/dist/lint/index.mjs +2 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1291,6 +1291,10 @@ declare function createConfig$6(): string;
|
|
|
1291
1291
|
* before every push. Installed by `holocron setup` when hooks are enabled
|
|
1292
1292
|
* (default for `protection: "strict"`). `git push --no-verify` bypasses it.
|
|
1293
1293
|
*
|
|
1294
|
+
* A script that runs a built file (`node cli/cli/dist/cli.mjs`) gets a check first: in a fresh clone or linked worktree
|
|
1295
|
+
* the build does not exist yet, and without it the push dies with a module-not-found stack trace instead of saying what
|
|
1296
|
+
* to do (#1104).
|
|
1297
|
+
*
|
|
1294
1298
|
* @param holocronScript - the command that invokes the CLI. Defaults to
|
|
1295
1299
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
1296
1300
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -3867,7 +3867,7 @@ function createConfig$6() {
|
|
|
3867
3867
|
return `${workflowHeader$3("shebang")}${pre_commit_default}`;
|
|
3868
3868
|
}
|
|
3869
3869
|
// src/templates/configs/pre-push/pre-push
|
|
3870
|
-
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__ run ci\n";
|
|
3870
|
+
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__BUILD_CHECK__\n__HOLOCRON_SCRIPT__ run ci\n";
|
|
3871
3871
|
// src/templates/configs/pre-push/create-config.ts
|
|
3872
3872
|
const { workflowHeader: workflowHeader$2 } = createHeader({ source: "cli/astromech/src/templates/configs/pre-push/create-config.ts" });
|
|
3873
3873
|
/**
|
|
@@ -3875,14 +3875,25 @@ const { workflowHeader: workflowHeader$2 } = createHeader({ source: "cli/astrome
|
|
|
3875
3875
|
* before every push. Installed by `holocron setup` when hooks are enabled
|
|
3876
3876
|
* (default for `protection: "strict"`). `git push --no-verify` bypasses it.
|
|
3877
3877
|
*
|
|
3878
|
+
* A script that runs a built file (`node cli/cli/dist/cli.mjs`) gets a check first: in a fresh clone or linked worktree
|
|
3879
|
+
* the build does not exist yet, and without it the push dies with a module-not-found stack trace instead of saying what
|
|
3880
|
+
* to do (#1104).
|
|
3881
|
+
*
|
|
3878
3882
|
* @param holocronScript - the command that invokes the CLI. Defaults to
|
|
3879
3883
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
3880
3884
|
*/
|
|
3881
3885
|
function createConfig$7(holocronScript = "pnpm exec holocron") {
|
|
3882
|
-
|
|
3886
|
+
const built = /^node(?:\s+-\S+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s"'-]\S*))$/.exec(holocronScript);
|
|
3887
|
+
const file = built?.[1] ?? built?.[2] ?? built?.[3];
|
|
3888
|
+
const buildCheck = file ? `if [ ! -f "${file}" ]; then
|
|
3889
|
+
\techo "pre-push: ${file} is not built yet. Run: pnpm install && pnpm build (or push with --no-verify)." >&2
|
|
3890
|
+
\texit 1
|
|
3891
|
+
fi
|
|
3892
|
+
` : "";
|
|
3893
|
+
return `${workflowHeader$2("shebang")}${pre_push_default.replace("__BUILD_CHECK__\n", buildCheck).replace("__HOLOCRON_SCRIPT__", holocronScript)}`;
|
|
3883
3894
|
}
|
|
3884
3895
|
// src/templates/configs/prepare-commit-msg/prepare-commit-msg
|
|
3885
|
-
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\n# --config <resolved shared path> (config-resolution workstream, #676) — falls\n# back to devmoji's own auto-discovery of a local devmoji.config.cjs when the\n# shared package's built dist/ isn't present (not installed, or a stale\n# install predating this file).\nDEVMOJI_CONFIG=\"node_modules/@theholocron/devmoji-config/dist/index.cjs\"\nif [ -f \"$DEVMOJI_CONFIG\" ]; then\n npx devmoji --config \"$DEVMOJI_CONFIG\"
|
|
3896
|
+
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\n# A copy of the message as git wrote it, so a failure below leaves it as it was. mktemp makes a file of its own name,\n# never one that already exists next to the message.\nORIGINAL=$(mktemp \"$1.XXXXXX\") || exit 1\ncp \"$1\" \"$ORIGINAL\"\n\ngit interpret-trailers --if-exists doNothing --trailer \\\n \"Signed-off-by: $NAME <$EMAIL>\" \\\n --in-place \"$1\"\n\n# --config <resolved shared path> (config-resolution workstream, #676) — falls\n# back to devmoji's own auto-discovery of a local devmoji.config.cjs when the\n# shared package's built dist/ isn't present (not installed, or a stale\n# install predating this file).\nDEVMOJI_CONFIG=\"node_modules/@theholocron/devmoji-config/dist/index.cjs\"\n\n# The message goes through devmoji on stdin and back into \"$1\", the file git passes to the hook. devmoji's own -e reads\n# .git/COMMIT_EDITMSG in the git root, which is the main checkout's file when the commit is made from a linked worktree\n# (.git is a file there): it would edit another checkout's message, or fail to find one (#1104).\nDEVMOJI_OUT=$(mktemp \"$1.XXXXXX\") || exit 1\nif [ -f \"$DEVMOJI_CONFIG\" ]; then\n npx devmoji --config \"$DEVMOJI_CONFIG\" <\"$1\" >\"$DEVMOJI_OUT\"\nelse\n npx devmoji <\"$1\" >\"$DEVMOJI_OUT\"\nfi || {\n cp \"$ORIGINAL\" \"$1\"\n rm -f \"$ORIGINAL\" \"$DEVMOJI_OUT\"\n exit 1\n}\ncat \"$DEVMOJI_OUT\" >\"$1\"\nrm -f \"$ORIGINAL\" \"$DEVMOJI_OUT\"\n";
|
|
3886
3897
|
// src/templates/configs/prepare-commit-msg/create-config.ts
|
|
3887
3898
|
const { workflowHeader: workflowHeader$1 } = createHeader({ source: "cli/astromech/src/templates/configs/prepare-commit-msg/create-config.ts" });
|
|
3888
3899
|
/** The `.husky/prepare-commit-msg` hook, a shell script under the auto-generated header. */
|
package/dist/lint/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.460",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@commitlint/lint": "^21.2.3",
|
|
56
56
|
"@commitlint/load": "^21.2.3",
|
|
57
57
|
"@commitlint/types": "^21.2.3",
|
|
58
|
-
"@theholocron/
|
|
58
|
+
"@theholocron/datapad": "5.0.0-alpha.460",
|
|
59
59
|
"@theholocron/fs-utils": "^1.17.0-alpha.4",
|
|
60
60
|
"@theholocron/misc-utils": "^1.17.0-alpha.4",
|
|
61
61
|
"@theholocron/pkg-utils": "^1.17.0-alpha.4",
|
|
62
|
-
"@theholocron/
|
|
62
|
+
"@theholocron/json-utils": "^1.17.0-alpha.4"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@commitlint/config-conventional": "^21.2.3",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"tsdown": "^0.23.7",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
75
|
"vitest": "^5.1.0",
|
|
76
|
+
"@theholocron/ci": "1.0.0",
|
|
76
77
|
"@theholocron/commitlint-config": "^8.9.0-alpha.18",
|
|
77
78
|
"@theholocron/eslint-config": "^8.9.0-alpha.18",
|
|
78
|
-
"@theholocron/ci": "1.0.0",
|
|
79
79
|
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.18",
|
|
80
80
|
"@theholocron/tsconfig": "^8.9.0-alpha.18",
|
|
81
|
-
"@theholocron/
|
|
82
|
-
"@theholocron/
|
|
81
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.18",
|
|
82
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.18"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=22"
|