@beplus/be 0.3.0 → 0.5.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.
Files changed (4) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +21 -1
  3. package/bin/be +17 -8
  4. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Igor Lamos
3
+ Copyright (c) 2026 Igor Lamos
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1 +1,21 @@
1
- # `be` – Interactively Manage Your `beplus` CLI Versions
1
+ <!-- TITLE/ -->
2
+
3
+ # @beplus/be
4
+
5
+ <!-- /TITLE -->
6
+
7
+ <!-- BADGES/ -->
8
+
9
+ [![NPM Version](https://img.shields.io/npm/v/@beplus/be)](https://npmjs.com/@beplus/be)
10
+
11
+ <!-- /BADGES -->
12
+
13
+ <!-- DESCRIPTION/ -->
14
+
15
+ Interactively Manage Your [**beplus CLI**](https://github.com/beplus/cli) Versions.
16
+
17
+ <!-- /DESCRIPTION -->
18
+
19
+ ## Usage
20
+
21
+ The [Documentation](https://docs.be.plus/cli/prerequisites#beplus-be) is available at https://docs.be.plus/cli.
package/bin/be CHANGED
@@ -64,7 +64,7 @@ function n_grep() {
64
64
  # Setup and state
65
65
  #
66
66
 
67
- VERSION="v0.3.0"
67
+ VERSION="v0.5.0"
68
68
 
69
69
  BE_PREFIX="${BE_PREFIX-/usr/local}"
70
70
  BE_PREFIX=${BE_PREFIX%/}
@@ -226,8 +226,8 @@ function update_arch_settings_for_version() {
226
226
  #
227
227
 
228
228
  function is_numeric_version() {
229
- # e.g. 6, v7.1, 8.11.3, 1.0.0-alpha.56
230
- [[ "$1" =~ ^[v]{0,1}[0-9]+(\.[0-9]+){0,2}(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]
229
+ # e.g. 6, v7.1, 8.11.3, 1.0.0-alpha.56, 1.0.0-beta.4+dev
230
+ [[ "$1" =~ ^[v]{0,1}[0-9]+(\.[0-9]+){0,2}(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]
231
231
  }
232
232
 
233
233
  #
@@ -235,8 +235,8 @@ function is_numeric_version() {
235
235
  #
236
236
 
237
237
  function is_exact_numeric_version() {
238
- # e.g. 6, v7.1, 8.11.3
239
- [[ "$1" =~ ^[v]{0,1}[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]
238
+ # e.g. 6, v7.1, 8.11.3, 1.0.0+dev
239
+ [[ "$1" =~ ^[v]{0,1}[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]
240
240
  }
241
241
 
242
242
  #
@@ -919,9 +919,17 @@ function display_compatible_file_field {
919
919
 
920
920
  function tarball_url() {
921
921
  local version="$1"
922
- local ext=gz
922
+
923
+ # Full release version (used in GitHub tag / path)
924
+ local url_version="${version//+/%2B}"
925
+
926
+ # Artifact version (filename MUST NOT contain +suffix)
927
+ local artifact_version="${version%%+*}"
928
+
929
+ local ext="gz"
923
930
  [ "$BE_USE_XZ" = "true" ] && ext="xz"
924
- echo "${g_mirror_url}/v${version}/beplus-cli-v${version}-$(display_tarball_platform).tar.${ext}"
931
+
932
+ echo "${g_mirror_url}/v${url_version}/beplus-cli-v${artifact_version}-$(display_tarball_platform).tar.${ext}"
925
933
  }
926
934
 
927
935
  #
@@ -1134,7 +1142,8 @@ function display_remote_versions() {
1134
1142
  fi
1135
1143
 
1136
1144
  # local index_url="https://api.github.com/repos/beplus/cli/releases"
1137
- local index_url="https://beplus.s3.amazonaws.com/cli/releases.json"
1145
+ # local index_url="https://beplus.s3.amazonaws.com/cli/releases.json"
1146
+ local index_url="${BE_RELEASE_INDEX_URL:-https://beplus.s3.amazonaws.com/cli/releases.json}"
1138
1147
 
1139
1148
  for row in $(do_get_index "${index_url}" | jq -r '.[] | @base64'); do
1140
1149
  _jq() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beplus/be",
3
3
  "description": "Interactively Manage beplus CLI Versions",
4
- "version": "0.3.0",
4
+ "version": "0.5.0",
5
5
  "author": "Igor Lamos <igor@be.plus>",
6
6
  "homepage": "https://github.com/beplus/be",
7
7
  "bugs": "https://github.com/beplus/be",