@meistrari/mise-en-place 2.16.0 → 2.17.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.
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+ #MISE description="Check if Infisical is logged in. Triggers login if not."
3
+ #USAGE flag "--login" negate="--no-login" default=#true help="Trigger login if not logged in. If false, exits with code 1 if not logged in."
4
+ #USAGE flag "-f --force" default=#false help="Force login even if already logged in."
5
+ #USAGE flag "-d --domain <domain>" default="https://app.infisical.com" help="Infisical domain to pass to login command." env="INFISICAL_DOMAIN"
6
+ #MISE quiet=true
7
+ #MISE interactive=true
8
+
9
+ set -euo pipefail
10
+
11
+
12
+ check_status() {
13
+ infisical login status &>/dev/null
14
+ }
15
+
16
+ login () {
17
+ infisical login --domain $usage_domain --silent
18
+ }
19
+
20
+ if [ $usage_force = true ]; then
21
+ login
22
+ fi
23
+
24
+ if [ $usage_login = false ]; then
25
+ check_status || exit 1
26
+ exit 0
27
+ fi
28
+
29
+ if ! check_status; then
30
+ login
31
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/mise-en-place",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",