devzone 0.8.0 → 0.8.2
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/.devcontainer/opencode.jsonc +105 -7
- package/core/scripts/versions.sh +28 -3
- package/package.json +1 -1
|
@@ -10,16 +10,114 @@
|
|
|
10
10
|
"compaction": {
|
|
11
11
|
"auto": true
|
|
12
12
|
},
|
|
13
|
-
//
|
|
13
|
+
// Permissions strictes par défaut : ce qui sert au travail est permis sans
|
|
14
|
+
// question, le reste demande ton accord (ask), et ce qui peut faire fuir un
|
|
15
|
+
// secret est interdit (deny). Ordre important : le dernier motif qui
|
|
16
|
+
// correspond l'emporte, donc garder « * » en tête, les allow ensuite et les
|
|
17
|
+
// deny en dernier. Pour élargir : retirer la ligne repère en tête du fichier
|
|
18
|
+
// (devzone le garde alors tel quel) puis ajouter un allow.
|
|
14
19
|
"permission": {
|
|
15
20
|
"edit": "allow",
|
|
16
|
-
"webfetch": "
|
|
21
|
+
"webfetch": "ask",
|
|
17
22
|
"bash": {
|
|
18
|
-
"*": "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
+
"*": "ask",
|
|
24
|
+
"git *": "allow",
|
|
25
|
+
"repowarden *": "allow",
|
|
26
|
+
"gh issue view*": "allow",
|
|
27
|
+
"gh issue list*": "allow",
|
|
28
|
+
"gh pr view*": "allow",
|
|
29
|
+
"gh pr list*": "allow",
|
|
30
|
+
"gh pr checks*": "allow",
|
|
31
|
+
"gh pr diff*": "allow",
|
|
32
|
+
"gh run list*": "allow",
|
|
33
|
+
"gh run view*": "allow",
|
|
34
|
+
"gh repo view*": "allow",
|
|
35
|
+
"gh search*": "allow",
|
|
36
|
+
"ls*": "allow",
|
|
37
|
+
"cat*": "allow",
|
|
38
|
+
"head*": "allow",
|
|
39
|
+
"tail*": "allow",
|
|
40
|
+
"wc*": "allow",
|
|
41
|
+
"grep*": "allow",
|
|
42
|
+
"rg*": "allow",
|
|
43
|
+
"find*": "allow",
|
|
44
|
+
"tree*": "allow",
|
|
45
|
+
"sed -n*": "allow",
|
|
46
|
+
"awk*": "allow",
|
|
47
|
+
"sort*": "allow",
|
|
48
|
+
"uniq*": "allow",
|
|
49
|
+
"cut*": "allow",
|
|
50
|
+
"diff*": "allow",
|
|
51
|
+
"jq*": "allow",
|
|
52
|
+
"file*": "allow",
|
|
53
|
+
"stat*": "allow",
|
|
54
|
+
"pwd": "allow",
|
|
55
|
+
"which*": "allow",
|
|
56
|
+
"command -v*": "allow",
|
|
57
|
+
"echo*": "allow",
|
|
58
|
+
"printf*": "allow",
|
|
59
|
+
"date*": "allow",
|
|
60
|
+
"mkdir*": "allow",
|
|
61
|
+
"touch*": "allow",
|
|
62
|
+
"cp*": "allow",
|
|
63
|
+
"mv*": "allow",
|
|
64
|
+
"rm *": "allow",
|
|
65
|
+
"chmod*": "allow",
|
|
66
|
+
"ln*": "allow",
|
|
67
|
+
"bats*": "allow",
|
|
68
|
+
"shellcheck*": "allow",
|
|
69
|
+
"actionlint*": "allow",
|
|
70
|
+
"bash -n*": "allow",
|
|
71
|
+
"npm test*": "allow",
|
|
72
|
+
"npm run*": "allow",
|
|
73
|
+
"npm ci*": "allow",
|
|
74
|
+
"npm install*": "allow",
|
|
75
|
+
"npx*": "allow",
|
|
76
|
+
"pnpm*": "allow",
|
|
77
|
+
"yarn*": "allow",
|
|
78
|
+
"node*": "allow",
|
|
79
|
+
"python*": "allow",
|
|
80
|
+
"python3*": "allow",
|
|
81
|
+
"pytest*": "allow",
|
|
82
|
+
"pip install*": "allow",
|
|
83
|
+
"uv*": "allow",
|
|
84
|
+
"ruff*": "allow",
|
|
85
|
+
"mvn*": "allow",
|
|
86
|
+
"./mvnw*": "allow",
|
|
87
|
+
"gradle*": "allow",
|
|
88
|
+
"./gradlew*": "allow",
|
|
89
|
+
"go *": "allow",
|
|
90
|
+
"cargo *": "allow",
|
|
91
|
+
"make*": "allow",
|
|
92
|
+
"docker build*": "allow",
|
|
93
|
+
"docker ps*": "allow",
|
|
94
|
+
"kubectl get*": "allow",
|
|
95
|
+
"helm template*": "allow",
|
|
96
|
+
"terraform fmt*": "allow",
|
|
97
|
+
"terraform validate*": "allow",
|
|
98
|
+
"opencode models*": "allow",
|
|
99
|
+
"devzone*": "allow",
|
|
100
|
+
"gh auth token*": "deny",
|
|
101
|
+
"gh auth status --show-token*": "deny",
|
|
102
|
+
"*hosts.yml*": "deny",
|
|
103
|
+
"*.credentials*": "deny",
|
|
104
|
+
"*auth.json*": "deny",
|
|
105
|
+
"*/.ssh/*": "deny",
|
|
106
|
+
"env": "deny",
|
|
107
|
+
"env *": "deny",
|
|
108
|
+
"printenv*": "deny",
|
|
109
|
+
"set": "deny",
|
|
110
|
+
"export -p*": "deny",
|
|
111
|
+
"curl*": "deny",
|
|
112
|
+
"wget*": "deny",
|
|
113
|
+
"nc *": "deny",
|
|
114
|
+
"ssh *": "deny",
|
|
115
|
+
"scp *": "deny",
|
|
116
|
+
"sudo*": "deny",
|
|
117
|
+
"rm -rf /*": "deny",
|
|
118
|
+
"git push --force*": "deny",
|
|
119
|
+
"git push -f*": "deny",
|
|
120
|
+
"git push --force-with-lease*": "deny"
|
|
23
121
|
}
|
|
24
122
|
},
|
|
25
123
|
"agent": {
|
package/core/scripts/versions.sh
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
# une ligne « paquet ancienne nouvelle » par paquet en retard, rien sinon
|
|
7
7
|
# bash core/scripts/versions.sh --appliquer <paquet> <version>
|
|
8
8
|
# remplace cette version figée dans son fichier, rien d'autre
|
|
9
|
+
# bash core/scripts/versions.sh --ticket-existant <paquet> <auteur>
|
|
10
|
+
# « numéro<TAB>titre » du ticket ouvert par <auteur>, rien sinon
|
|
9
11
|
# Compatible bash 3.2 (macOS).
|
|
10
12
|
set -euo pipefail
|
|
11
13
|
|
|
@@ -68,6 +70,24 @@ lister() {
|
|
|
68
70
|
done < <(figees)
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
# Affiche « numéro<TAB>titre » du ticket ouvert par $2 dont le titre commence
|
|
74
|
+
# par « $1 », rien sinon : un ticket au même titre ouvert par un autre est ignoré.
|
|
75
|
+
ticket_existant() {
|
|
76
|
+
local paquet="$1" auteur="$2" tickets numero titre auteur_ticket
|
|
77
|
+
tickets="$(gh issue list --state open --limit 200 --json number,title,author \
|
|
78
|
+
--jq '.[] | "\(.number)\t\(.title)\t\(.author.login)"')"
|
|
79
|
+
while IFS=$'\t' read -r numero titre auteur_ticket; do
|
|
80
|
+
[ -n "$numero" ] || continue
|
|
81
|
+
case "$titre" in
|
|
82
|
+
"$paquet "*) ;;
|
|
83
|
+
*) continue ;;
|
|
84
|
+
esac
|
|
85
|
+
[ "$auteur_ticket" = "$auteur" ] || continue
|
|
86
|
+
printf '%s\t%s\n' "$numero" "$titre"
|
|
87
|
+
return 0
|
|
88
|
+
done <<<"$tickets"
|
|
89
|
+
}
|
|
90
|
+
|
|
71
91
|
# Échappe $1 pour un motif sed (le délimiteur est « | »)
|
|
72
92
|
echapper() {
|
|
73
93
|
printf '%s' "$1" | sed "s/[][\\\\.*^$()+?{}|]/\\\\&/g"
|
|
@@ -106,12 +126,17 @@ case "${1:-}" in
|
|
|
106
126
|
"") lister ;;
|
|
107
127
|
--appliquer)
|
|
108
128
|
[ "$#" -eq 3 ] ||
|
|
109
|
-
{ echo "usage : bash core/scripts/versions.sh [--appliquer <paquet> <version>]" >&2; exit 2; }
|
|
129
|
+
{ echo "usage : bash core/scripts/versions.sh [--appliquer <paquet> <version> | --ticket-existant <paquet> <auteur>]" >&2; exit 2; }
|
|
110
130
|
appliquer "$2" "$3"
|
|
111
131
|
;;
|
|
112
|
-
-
|
|
132
|
+
--ticket-existant)
|
|
133
|
+
[ "$#" -eq 3 ] ||
|
|
134
|
+
{ echo "usage : bash core/scripts/versions.sh [--appliquer <paquet> <version> | --ticket-existant <paquet> <auteur>]" >&2; exit 2; }
|
|
135
|
+
ticket_existant "$2" "$3"
|
|
136
|
+
;;
|
|
137
|
+
-h | --help) sed -n '2,11p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//' ;;
|
|
113
138
|
*)
|
|
114
|
-
echo "usage : bash core/scripts/versions.sh [--appliquer <paquet> <version>]" >&2
|
|
139
|
+
echo "usage : bash core/scripts/versions.sh [--appliquer <paquet> <version> | --ticket-existant <paquet> <auteur>]" >&2
|
|
115
140
|
exit 2
|
|
116
141
|
;;
|
|
117
142
|
esac
|
package/package.json
CHANGED