climaybe 2.4.2 → 3.0.1

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.
@@ -68,7 +68,7 @@ jobs:
68
68
  fi
69
69
  echo "hotfix_skip_alias=$HOTFIX_SKIP_ALIAS" >> $GITHUB_OUTPUT
70
70
 
71
- # Read store list from package.json
71
+ # Read store list from climaybe.config.json
72
72
  config:
73
73
  needs: gate
74
74
  if: needs.gate.outputs.should_run == 'true'
@@ -82,8 +82,9 @@ jobs:
82
82
  id: read
83
83
  run: |
84
84
  STORES=$(node -e "
85
- const pkg = require('./package.json');
86
- const stores = Object.keys(pkg.config?.stores || {});
85
+ const fs = require('fs');
86
+ const cfg = JSON.parse(fs.readFileSync('./climaybe.config.json', 'utf8'));
87
+ const stores = Object.keys(cfg?.stores || {});
87
88
  console.log(JSON.stringify(stores));
88
89
  ")
89
90
  echo "stores=$STORES" >> $GITHUB_OUTPUT
@@ -48,9 +48,9 @@ jobs:
48
48
  run: |
49
49
  DEFAULT_ALIAS=$(node -e "
50
50
  const fs = require('fs');
51
- const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
52
- const stores = pkg?.config?.stores || {};
53
- const defaultStoreRaw = pkg?.config?.default_store;
51
+ const cfg = JSON.parse(fs.readFileSync('./climaybe.config.json', 'utf8'));
52
+ const stores = cfg?.stores || {};
53
+ const defaultStoreRaw = cfg?.default_store;
54
54
  const normalize = (v) => String(v || '').toLowerCase().replace(/^https?:\\/\\//, '').replace(/\/.*\$/, '');
55
55
  const defaultStore = normalize(defaultStoreRaw);
56
56
  let alias = '';
@@ -47,7 +47,7 @@ jobs:
47
47
  echo "staging_branch=$BRANCH" >> $GITHUB_OUTPUT
48
48
  echo "live_branch=live-${ALIAS}" >> $GITHUB_OUTPUT
49
49
 
50
- - name: Resolve store domain from package.json
50
+ - name: Resolve store domain from climaybe.config.json
51
51
  id: store
52
52
  env:
53
53
  SHOPIFY_STORE_URL_SCOPED: ${{ secrets[format('SHOPIFY_STORE_URL_{0}', steps.alias.outputs.alias_secret)] }}
@@ -56,8 +56,8 @@ jobs:
56
56
  ALIAS="${{ steps.alias.outputs.alias }}"
57
57
  DOMAIN_CONFIG=$(node -e "
58
58
  const fs = require('fs');
59
- const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
60
- const domain = pkg?.config?.stores?.['${ALIAS}'] || '';
59
+ const cfg = JSON.parse(fs.readFileSync('./climaybe.config.json', 'utf8'));
60
+ const domain = cfg?.stores?.['${ALIAS}'] || '';
61
61
  process.stdout.write(domain);
62
62
  ")
63
63
  DOMAIN="${SHOPIFY_STORE_URL_SCOPED:-}"
@@ -31,9 +31,9 @@ jobs:
31
31
  else
32
32
  ALIAS=$(node -e "
33
33
  const fs = require('fs');
34
- const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
35
- const stores = pkg?.config?.stores || {};
36
- const defaultStoreRaw = pkg?.config?.default_store;
34
+ const cfg = JSON.parse(fs.readFileSync('./climaybe.config.json', 'utf8'));
35
+ const stores = cfg?.stores || {};
36
+ const defaultStoreRaw = cfg?.default_store;
37
37
  const normalize = (v) => String(v || '')
38
38
  .toLowerCase()
39
39
  .replace(/^https?:\\/\\//, '')
@@ -63,7 +63,7 @@ jobs:
63
63
  fi
64
64
 
65
65
  if [ -z "$ALIAS" ]; then
66
- echo "Could not resolve store alias from package.json config or base branch."
66
+ echo "Could not resolve store alias from climaybe.config.json config or base branch."
67
67
  exit 1
68
68
  fi
69
69
 
@@ -34,9 +34,9 @@ jobs:
34
34
  else
35
35
  ALIAS=$(node -e "
36
36
  const fs = require('fs');
37
- const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
38
- const stores = pkg?.config?.stores || {};
39
- const defaultStoreRaw = pkg?.config?.default_store;
37
+ const cfg = JSON.parse(fs.readFileSync('./climaybe.config.json', 'utf8'));
38
+ const stores = cfg?.stores || {};
39
+ const defaultStoreRaw = cfg?.default_store;
40
40
  const normalize = (v) => String(v || '')
41
41
  .toLowerCase()
42
42
  .replace(/^https?:\\/\\//, '')
@@ -66,7 +66,7 @@ jobs:
66
66
  fi
67
67
 
68
68
  if [ -z "$ALIAS" ]; then
69
- echo "Could not resolve default store alias from package.json config."
69
+ echo "Could not resolve default store alias from climaybe.config.json config."
70
70
  exit 1
71
71
  fi
72
72