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.
- package/README.md +25 -26
- package/bin/version.txt +1 -1
- package/package.json +9 -1
- package/src/commands/add-dev-kit.js +5 -3
- package/src/commands/add-store.js +22 -7
- package/src/commands/app-init.js +1 -1
- package/src/commands/build-scripts.js +27 -0
- package/src/commands/create-entrypoints.js +45 -0
- package/src/commands/ensure-branches.js +4 -9
- package/src/commands/init.js +69 -18
- package/src/commands/migrate-legacy-config.js +217 -0
- package/src/index.js +37 -2
- package/src/lib/build-scripts.js +153 -0
- package/src/lib/build-workflows.js +3 -43
- package/src/lib/config.js +78 -8
- package/src/lib/dev-runtime.js +210 -0
- package/src/lib/prompts.js +29 -6
- package/src/lib/shopify-cli.js +30 -0
- package/src/lib/theme-dev-kit.js +52 -52
- package/src/lib/watch.js +80 -0
- package/src/lib/workflows.js +2 -4
- package/src/workflows/build/create-release.yml +23 -6
- package/src/workflows/build/reusable-build.yml +26 -6
- package/src/workflows/multi/main-to-staging-stores.yml +4 -3
- package/src/workflows/multi/multistore-hotfix-to-main.yml +3 -3
- package/src/workflows/multi/pr-to-live.yml +3 -3
- package/src/workflows/preview/pr-close.yml +4 -4
- package/src/workflows/preview/pr-update.yml +4 -4
|
@@ -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
|
|
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
|
|
86
|
-
const
|
|
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
|
|
52
|
-
const stores =
|
|
53
|
-
const defaultStoreRaw =
|
|
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
|
|
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
|
|
60
|
-
const domain =
|
|
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
|
|
35
|
-
const stores =
|
|
36
|
-
const defaultStoreRaw =
|
|
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
|
|
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
|
|
38
|
-
const stores =
|
|
39
|
-
const defaultStoreRaw =
|
|
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
|
|
69
|
+
echo "Could not resolve default store alias from climaybe.config.json config."
|
|
70
70
|
exit 1
|
|
71
71
|
fi
|
|
72
72
|
|