devzone 0.58.0 → 1.0.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.
@@ -33,14 +33,10 @@ fail() {
33
33
  # Reads the single accepted flag ($1) from following args ($3…): prints 1 if
34
34
  # present, 0 otherwise; any other flag: error with usage ($2), exit code 1.
35
35
  read_flag() {
36
- local flag="$1" usage="$2" a found=0 legacy=""
36
+ local flag="$1" usage="$2" a found=0
37
37
  shift 2
38
- case "$flag" in
39
- --yes) legacy="--oui" ;;
40
- --bring-back) legacy="--rapatrier" ;;
41
- esac
42
38
  for a in "$@"; do
43
- if [ "$a" = "$flag" ] || { [ -n "$legacy" ] && [ "$a" = "$legacy" ]; }; then found=1; continue; fi
39
+ if [ "$a" = "$flag" ]; then found=1; continue; fi
44
40
  fail "unknown option: $a (devzone workspace $usage)"
45
41
  return 1
46
42
  done
@@ -1,35 +1,8 @@
1
1
  #!/usr/bin/env bash
2
- # Names of the workspace command during the English migration (#502, lot 3),
3
- # sourced by manage/workspace.sh:
4
- # workspace_command <name> French subcommand name turned into the English one
5
- # workspace_ports_command <name> same for the ports subcommand
6
- # compatibility aliases of the renamed functions, kept until lot 4 (#509)
7
- # Why: command_canonical (.devcontainer/command-aliases.sh) still gives the
8
- # French name; workspace.sh switches on the English ones. bash 3.2 (macOS).
9
-
10
- workspace_command() {
11
- case "${1:-}" in
12
- demarrer) echo start ;;
13
- mettre-a-jour) echo update ;;
14
- arreter) echo stop ;;
15
- etat) echo status ;;
16
- copier-vers) echo copy-to ;;
17
- copier-depuis) echo copy-from ;;
18
- migrer) echo migrate ;;
19
- revenir) echo revert ;;
20
- nettoyer-docker) echo clean-docker ;;
21
- *) echo "${1:-}" ;;
22
- esac
23
- }
24
-
25
- workspace_ports_command() {
26
- case "${1:-}" in
27
- demarrer) echo start ;;
28
- arreter) echo stop ;;
29
- etat) echo status ;;
30
- *) echo "${1:-}" ;;
31
- esac
32
- }
2
+ # Compatibility aliases of the workspace functions renamed during the English
3
+ # migration (#502, lot 3), sourced by manage/workspace.sh. The old French names
4
+ # of the subcommands are refused by reject_renamed (.devcontainer/command-aliases.sh, #695).
5
+ # bash 3.2 (macOS).
33
6
 
34
7
  # compatibility aliases, removed with lot 4 (#509); RACINE and ICI are still
35
8
  # read by the scripts of the lot 5 files (argocd-*.sh, services-workspace.sh)
@@ -192,24 +192,19 @@ copy_from() {
192
192
  # shellcheck source=manage/scripts/workspace-egress.sh
193
193
  . "$HERE/scripts/workspace-egress.sh"
194
194
 
195
- # English command names are accepted, French ones unchanged and warned (#502,
196
- # #532). A copied devzone may miss the aliases file: then no normalization.
195
+ # Renamed names (#695): an old French name is refused before anything runs, with
196
+ # its English name (« devzone workspace start »). A copied devzone may miss the
197
+ # aliases file: then no check.
197
198
  # shellcheck source=../.devcontainer/command-aliases.sh
198
199
  # shellcheck disable=SC1091
199
200
  if [ -f "$ROOT/.devcontainer/command-aliases.sh" ]; then
200
201
  . "$ROOT/.devcontainer/command-aliases.sh"
201
- if [ "$#" -gt 0 ]; then
202
- if command -v command_deprecated_warning >/dev/null 2>&1; then
203
- command_deprecated_warning "$1"
204
- fi
205
- set -- "$(command_canonical "$1")" "${@:2}"
202
+ reject_renamed workspace "$@" || exit 1
203
+ if [ "${1:-}" = ports ] && [ "$#" -gt 1 ]; then
204
+ reject_renamed "workspace ports" "${@:2}" || exit 1
206
205
  fi
207
206
  fi
208
207
 
209
- if [ "$#" -gt 0 ]; then set -- "$(workspace_command "$1")" "${@:2}"; fi
210
- if [ "${1:-}" = "ports" ] && [ "$#" -gt 1 ]; then
211
- set -- "$1" "$(workspace_ports_command "$2")" "${@:3}"
212
- fi
213
208
 
214
209
  case "${1:-}" in
215
210
  start) start_workspace "${@:2}" ;;
@@ -228,7 +223,7 @@ case "${1:-}" in
228
223
  services) services "${@:2}" ;;
229
224
  argocd) argocd_cmd "${@:2}" ;;
230
225
  egress) egress_workspace "${@:2}" ;;
231
- '' | -h | --help | aide)
226
+ '' | -h | --help | help)
232
227
  echo "devzone workspace start|stop|status|shell|vscode|copy-to|copy-from|clone|ports|services|argocd|migrate|revert|clean-docker|update|egress"
233
228
  echo " start [--image repository:tag] install workspace (image for devzone version by default)"
234
229
  echo " update [--version X.Y.Z] [--yes] move to the latest stable release (or X.Y.Z); the pod is recreated"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devzone",
3
- "version": "0.58.0",
3
+ "version": "1.0.0",
4
4
  "description": "Ton poste de développement Linux, prêt en une commande, identique sur Mac, Windows et Linux.",
5
5
  "license": "GPL-3.0-only",
6
6
  "repository": {