@sequencemedia/crypto 1.1.20 → 1.1.22

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/crypto.sh CHANGED
@@ -35,7 +35,7 @@ get_args () {
35
35
  VERBOSE=true
36
36
  ;;
37
37
  *)
38
- echo Ignoring "$flag"
38
+ # Ignoring "$flag"
39
39
  ;;
40
40
  esac
41
41
  done
package/decrypt.sh CHANGED
@@ -18,13 +18,14 @@ fi
18
18
 
19
19
  if [ -d "$ORIGIN" ];
20
20
  then
21
- if [ -d "$DESTINATION" ];
21
+ if [ -f "$DESTINATION" ];
22
22
  then
23
+ echo Origin is a directory but destination is a file
24
+ exit 1
25
+ else
26
+ mkdir -p "$DESTINATION" 2> /dev/null
23
27
  decrypt_directory "$ORIGIN" "$DESTINATION"
24
28
  exit 0
25
- else
26
- echo Origin is a directory but destination is not a directory
27
- exit 1
28
29
  fi
29
30
  else
30
31
  if [ -f "$ORIGIN" ];
@@ -33,9 +34,12 @@ else
33
34
  then
34
35
  echo Origin is a file but destination is a directory
35
36
  exit 1
37
+ else
38
+ decrypt "$ORIGIN" > "$DESTINATION"
39
+ exit 0
36
40
  fi
37
41
  fi
38
42
  fi
39
43
 
40
- decrypt "$ORIGIN" > "$DESTINATION"
41
- exit 0
44
+ echo Origin is neither a file nor a directory
45
+ exit 1
package/encrypt.sh CHANGED
@@ -18,13 +18,14 @@ fi
18
18
 
19
19
  if [ -d "$ORIGIN" ];
20
20
  then
21
- if [ -d "$DESTINATION" ];
21
+ if [ -f "$DESTINATION" ];
22
22
  then
23
+ echo Origin is a directory but destination is a file
24
+ exit 1
25
+ else
26
+ mkdir -p "$DESTINATION" 2> /dev/null
23
27
  encrypt_directory "$ORIGIN" "$DESTINATION"
24
28
  exit 0
25
- else
26
- echo Origin is a directory but destination is not a directory
27
- exit 1
28
29
  fi
29
30
  else
30
31
  if [ -f "$ORIGIN" ];
@@ -33,9 +34,12 @@ else
33
34
  then
34
35
  echo Origin is a file but destination is a directory
35
36
  exit 1
37
+ else
38
+ encrypt "$ORIGIN" > "$DESTINATION"
39
+ exit 0
36
40
  fi
37
41
  fi
38
42
  fi
39
43
 
40
- encrypt "$ORIGIN" > "$DESTINATION"
41
- exit 0
44
+ echo Origin is neither a file nor a directory
45
+ exit 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequencemedia/crypto",
3
- "version": "1.1.20",
3
+ "version": "1.1.22",
4
4
  "keywords": [
5
5
  "crypto",
6
6
  "node",
@@ -40,8 +40,8 @@
40
40
  "@babel/core": "^7.21.4",
41
41
  "@babel/eslint-parser": "^7.21.3",
42
42
  "@babel/preset-env": "^7.21.4",
43
- "@sequencemedia/hooks": "^1.0.393",
44
- "@types/node": "^18.15.13",
43
+ "@sequencemedia/hooks": "^1.0.394",
44
+ "@types/node": "^18.16.0",
45
45
  "core-js": "^3.30.1",
46
46
  "eslint": "^8.39.0",
47
47
  "eslint-config-standard": "^17.0.0",