climaybe 1.4.2 → 1.4.3

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/bin/version.txt CHANGED
@@ -1 +1 @@
1
- 1.4.2
1
+ 1.4.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "climaybe",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Shopify CI/CD CLI — scaffolds workflows, branch strategy, and store config for single-store and multi-store theme repos",
5
5
  "type": "module",
6
6
  "bin": {
@@ -140,12 +140,12 @@ async function runInitFlow() {
140
140
  const existingNames =
141
141
  ciHost === 'github' ? listGitHubSecrets() : listGitLabVariables();
142
142
  const namesWeWillPrompt = new Set(secretsToPrompt.map((s) => s.name));
143
- const alreadySet = existingNames.filter((n) => namesWeWillPrompt.has(n));
144
- if (alreadySet.length > 0) {
145
- const doUpdate = await promptUpdateExistingSecrets(alreadySet);
146
- if (!doUpdate) {
147
- console.log(pc.dim('\n Skipping. Existing secrets left unchanged.\n'));
148
- return;
143
+ const alreadySet = new Set(existingNames.filter((n) => namesWeWillPrompt.has(n)));
144
+ let doUpdateExisting = true;
145
+ if (alreadySet.size > 0) {
146
+ doUpdateExisting = await promptUpdateExistingSecrets([...alreadySet]);
147
+ if (!doUpdateExisting) {
148
+ console.log(pc.dim('\n Skipping only the secret(s) already set; will still prompt for the rest.\n'));
149
149
  }
150
150
  }
151
151
 
@@ -159,6 +159,7 @@ async function runInitFlow() {
159
159
  stores,
160
160
  });
161
161
  for (const { name, value } of storeUrlSecrets) {
162
+ if (alreadySet.has(name) && !doUpdateExisting) continue;
162
163
  try {
163
164
  await setter.set(name, value);
164
165
  console.log(pc.green(` Set ${name} (from store config).`));
@@ -168,10 +169,12 @@ async function runInitFlow() {
168
169
  }
169
170
  }
170
171
 
171
- console.log(pc.cyan(`\n Configure ${total} ${setter.name} secret(s)/variable(s). Leave optional ones blank to skip.\n`));
172
- for (let i = 0; i < secretsToPrompt.length; i++) {
173
- const secret = secretsToPrompt[i];
174
- const value = await promptSecretValue(secret, i, total);
172
+ const toPrompt = secretsToPrompt.filter((s) => !alreadySet.has(s.name) || doUpdateExisting);
173
+ const totalToPrompt = toPrompt.length;
174
+ console.log(pc.cyan(`\n Configure ${totalToPrompt} ${setter.name} secret(s)/variable(s). Leave optional ones blank to skip.\n`));
175
+ for (let i = 0; i < toPrompt.length; i++) {
176
+ const secret = toPrompt[i];
177
+ const value = await promptSecretValue(secret, i, totalToPrompt);
175
178
  if (!value) continue;
176
179
 
177
180
  const isThemeToken =