@speedkit/cli 4.46.0 → 4.47.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [4.47.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.46.0...v4.47.0) (2026-10-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * **bulk-deploy:** count a configuration that is live already as deployed ([c8a3e11](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/c8a3e11460bd13dc6c46a16ca5551aa80213c1e1))
7
+
1
8
  # [4.46.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.45.2...v4.46.0) (2026-10-16)
2
9
 
3
10
 
@@ -191,10 +191,13 @@ export class BulkDeployService {
191
191
  /** The summary of the run, and everything a developer has to take over. */
192
192
  summarize(planned) {
193
193
  const results = planned.map((entry) => entry.result);
194
- const applied = results.filter((result) => result.outcome === DeployOutcome.Applied);
194
+ // A configuration that already carries the merge request is deployed too.
195
+ const isLive = (result) => result.outcome === DeployOutcome.Applied ||
196
+ result.outcome === DeployOutcome.AlreadyDeployed;
197
+ const live = results.filter(isLive);
195
198
  // Without a deploy the plan above already is the summary.
196
- if (applied.length > 0) {
197
- this.writeTable("Summary", planned.filter((entry) => entry.result.outcome !== DeployOutcome.Applied));
199
+ if (results.some((result) => result.outcome === DeployOutcome.Applied)) {
200
+ this.writeTable("Summary", planned.filter((entry) => !isLive(entry.result)));
198
201
  }
199
202
  const byHand = results.flatMap((result) => result.notDeployed ?? []);
200
203
  if (byHand.length > 0) {
@@ -202,7 +205,7 @@ export class BulkDeployService {
202
205
  this.cli.code([...new Set(byHand)].join(", "));
203
206
  }
204
207
  this.cli.spacer();
205
- this.cli.write(`${applied.length} of ${results.length} configuration(s) deployed`);
208
+ this.cli.write(`${live.length} of ${results.length} configuration(s) deployed`);
206
209
  return results;
207
210
  }
208
211
  writeTable(title, planned) {
@@ -32,12 +32,14 @@ function writeCustomer(directory, config) {
32
32
  /** A CLI that answers every question the same way, and records them. */
33
33
  function cliAnswering(confirmed, selected = ApprovalAnswer.Skip) {
34
34
  const questions = [];
35
+ const written = [];
36
+ const tables = [];
35
37
  const cli = {
36
38
  spacer: () => undefined,
37
- write: () => undefined,
39
+ write: (line) => written.push(line),
38
40
  writeWarning: () => undefined,
39
41
  code: () => undefined,
40
- table: () => undefined,
42
+ table: (rows) => tables.push(rows),
41
43
  startAction: () => undefined,
42
44
  successAction: () => undefined,
43
45
  prompt: async () => "a description",
@@ -50,7 +52,7 @@ function cliAnswering(confirmed, selected = ApprovalAnswer.Skip) {
50
52
  return selected;
51
53
  },
52
54
  };
53
- return { cli, questions };
55
+ return { cli, questions, written, tables };
54
56
  }
55
57
  /** A deploy that plans as told, and records what was deployed. */
56
58
  function deployFactory(plans, deployed, failing = [], changingDevice = []) {
@@ -175,4 +177,14 @@ describe("BulkDeployService", () => {
175
177
  expect(deployed).to.deep.equal([]);
176
178
  expect(results[0].reason).to.equal("the device detection change was not confirmed");
177
179
  });
180
+ it("counts a configuration that is live already as deployed", async () => {
181
+ const { cli, written, tables } = cliAnswering(true);
182
+ await serviceOf([
183
+ "customers/gohaus/config_SpeedKit.js",
184
+ "customers/bonprix/config_SpeedKit.js",
185
+ ], deployFactory({ "customers/bonprix[production]": DeployOutcome.AlreadyDeployed }, []), cli, ApprovalAnswer.Approved).run();
186
+ expect(written.at(-1)).to.equal("2 of 2 configuration(s) deployed");
187
+ // The plan is the one table: the summary leaves out every live config.
188
+ expect(tables).to.have.length(1);
189
+ });
178
190
  });
@@ -1927,5 +1927,5 @@
1927
1927
  ]
1928
1928
  }
1929
1929
  },
1930
- "version": "4.46.0"
1930
+ "version": "4.47.0"
1931
1931
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "4.46.0",
4
+ "version": "4.47.0",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"