@nitra/cursor 3.19.0 → 3.21.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/.claude-template/hooks/capture-decisions.sh +1 -1
- package/.claude-template/hooks/normalize-decisions.sh +8 -4
- package/CHANGELOG.md +33 -0
- package/bin/n-cursor.js +53 -0
- package/package.json +1 -1
- package/rules/adr/adr.mdc +5 -5
- package/rules/adr/js/templates/hooks/.gitignore.snippet +1 -0
- package/rules/changelog/changelog.mdc +1 -1
- package/rules/changelog/js/consistency.mjs +69 -12
- package/rules/ci4/ci4.mdc +2 -2
- package/rules/docker/docker.mdc +3 -3
- package/rules/docker/js/lint.mjs +1 -1
- package/rules/docker/lib/docker-hadolint.mjs +27 -55
- package/rules/ga/lint/lint.mjs +18 -54
- package/rules/js-run/js/runtime.mjs +32 -0
- package/rules/js-run/js-run.mdc +6 -0
- package/rules/js-run/lib/temporal-scan.mjs +52 -0
- package/rules/k8s/lint/lint.mjs +3 -10
- package/rules/nginx-default-tpl/js/template.mjs +39 -1
- package/rules/nginx-default-tpl/nginx-default-tpl.mdc +3 -1
- package/rules/npm-module/js/skill_meta.mjs +12 -0
- package/rules/npm-module/npm-module.mdc +1 -1
- package/rules/npm-module/policy/npm_publish_yml/target.json +1 -0
- package/rules/rego/lint/lint.mjs +10 -55
- package/rules/release/change.mjs +34 -5
- package/rules/release/lib/change-file.mjs +26 -11
- package/rules/text/lint/lint.mjs +11 -40
- package/rules/worktree/policy/vscode_settings/target.json +5 -0
- package/rules/worktree/policy/vscode_settings/template/settings.json.snippet.json +8 -0
- package/rules/worktree/policy/zed_settings/target.json +5 -0
- package/rules/worktree/policy/zed_settings/template/settings.json.snippet.json +12 -0
- package/rules/worktree/worktree.mdc +52 -0
- package/schemas/target.json +5 -0
- package/scripts/lib/assert-project-root.mjs +80 -0
- package/scripts/lib/ensure-tool.mjs +352 -0
- package/scripts/lib/root-notice.mjs +64 -0
- package/scripts/lib/run-conftest-batch.mjs +6 -28
- package/scripts/lib/run-rule.mjs +61 -5
- package/scripts/lib/skill-meta.mjs +16 -2
- package/scripts/lib/template.mjs +29 -3
- package/scripts/lib/worktree-notice.mjs +121 -73
- package/scripts/sync-claude-config.mjs +2 -2
- package/skills/fix/SKILL.md +4 -4
- package/skills/llm-patch/meta.json +1 -1
- package/skills/publish-telegram/meta.json +1 -1
- package/skills/start-check/meta.json +1 -1
- package/skills/worktree/meta.json +1 -1
- package/types/bin/n-cursor.d.ts +1 -1
- package/rules/npm-module/policy/npm_publish_yml/npm_publish_yml.rego +0 -87
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "auto": "завжди", "worktree": false }
|
|
1
|
+
{ "auto": "завжди", "worktree": false, "requireRoot": true }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "auto": "завжди", "worktree": false }
|
|
1
|
+
{ "auto": "завжди", "worktree": false, "requireRoot": false }
|
package/types/bin/n-cursor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export {}
|
|
2
|
+
export {};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# Перевірка `.github/workflows/npm-publish.yml` (npm-module.mdc).
|
|
2
|
-
#
|
|
3
|
-
# Канон надходить через --data: { "template": { "snippet": ... } }
|
|
4
|
-
# Структура --data сформована з template/npm-publish.yml.snippet.yml.
|
|
5
|
-
# Per-concern field-by-field: path/substring-маркери з expected_uses_set читаються
|
|
6
|
-
# зі steps template, експектації branches/paths — subset-of.
|
|
7
|
-
#
|
|
8
|
-
# Універсальні workflow-перевірки (concurrency, заборонені setup-bun/cache/install,
|
|
9
|
-
# shell line-continuation) — у `ga.workflow_common`.
|
|
10
|
-
package npm_module.npm_publish_yml
|
|
11
|
-
|
|
12
|
-
import rego.v1
|
|
13
|
-
|
|
14
|
-
# YAML 1.1 quirk: ключ `on:` → boolean true → у конфтесті ключ "true".
|
|
15
|
-
gha_on := input["true"]
|
|
16
|
-
|
|
17
|
-
# Required marker — substring у `uses` для ідентифікації npm-publish кроку.
|
|
18
|
-
publish_action_marker := "JS-DevTools/npm-publish"
|
|
19
|
-
|
|
20
|
-
# Очікувані літерали з template.
|
|
21
|
-
expected_paths := {p | some p in data.template.snippet.on.push.paths}
|
|
22
|
-
|
|
23
|
-
expected_branches := {b | some b in data.template.snippet.on.push.branches}
|
|
24
|
-
|
|
25
|
-
expected_permissions := data.template.snippet.jobs["release-publish"].permissions
|
|
26
|
-
|
|
27
|
-
# Required publish-step (за маркером): expected `with.package` value з template.
|
|
28
|
-
expected_publish_with_package := s.with.package if {
|
|
29
|
-
some s in data.template.snippet.jobs["release-publish"].steps
|
|
30
|
-
contains(object.get(s, "uses", ""), publish_action_marker)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
# ── deny: paths містить кожне з expected_paths (subset-of) ───────────────
|
|
34
|
-
|
|
35
|
-
deny contains msg if {
|
|
36
|
-
some required_path in expected_paths
|
|
37
|
-
not path_present(required_path)
|
|
38
|
-
msg := sprintf("npm-publish.yml: у on.push.paths має бути `%s` (npm-module.mdc)", [required_path])
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
# ── deny: branches містить кожне з expected_branches (subset-of) ─────────
|
|
42
|
-
|
|
43
|
-
deny contains msg if {
|
|
44
|
-
some required_branch in expected_branches
|
|
45
|
-
not required_branch in {b | some b in gha_on.push.branches}
|
|
46
|
-
msg := sprintf("npm-publish.yml: on.push.branches має містити `%s` (npm-module.mdc)", [required_branch])
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
# ── deny: id-token: write у permissions хоч одного job ────────────────────
|
|
50
|
-
|
|
51
|
-
deny contains msg if {
|
|
52
|
-
required := expected_permissions["id-token"]
|
|
53
|
-
not any_job_has_id_token(required)
|
|
54
|
-
msg := sprintf("npm-publish.yml: permissions має містити `id-token: %s` (OIDC) (npm-module.mdc)", [required])
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
# ── deny: крок з uses-маркером npm-publish та канонічним with.package ────
|
|
58
|
-
|
|
59
|
-
deny contains msg if {
|
|
60
|
-
not has_npm_publish_step
|
|
61
|
-
msg := sprintf(
|
|
62
|
-
"npm-publish.yml: очікується `uses: %s` з `with.package: %s` (npm-module.mdc)",
|
|
63
|
-
[publish_action_marker, expected_publish_with_package],
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
# ── helpers ────────────────────────────────────────────────────────────────
|
|
68
|
-
|
|
69
|
-
# Path присутній, якщо хоч один шлях у actual містить required як substring
|
|
70
|
-
# (npm/** glob у workflow може бути записаний як `npm/**` або `'npm/**'`).
|
|
71
|
-
path_present(required) if {
|
|
72
|
-
some p in gha_on.push.paths
|
|
73
|
-
is_string(p)
|
|
74
|
-
contains(p, required)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
any_job_has_id_token(required) if {
|
|
78
|
-
some job in object.get(input, "jobs", {})
|
|
79
|
-
job.permissions["id-token"] == required
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
has_npm_publish_step if {
|
|
83
|
-
some job in object.get(input, "jobs", {})
|
|
84
|
-
some step in object.get(job, "steps", [])
|
|
85
|
-
contains(object.get(step, "uses", ""), publish_action_marker)
|
|
86
|
-
step.with.package == expected_publish_with_package
|
|
87
|
-
}
|