@speedkit/cli 3.31.1 → 3.31.2

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
+ ## [3.31.2](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.31.1...v3.31.2) (2026-03-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **diff:** return updatedFile instead of originalFile after diff ([4894d1b](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/4894d1bc93387665add4d85af35b93650a911103))
7
+
1
8
  ## [3.31.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.31.0...v3.31.1) (2026-03-09)
2
9
 
3
10
 
package/README.md CHANGED
@@ -21,7 +21,7 @@ $ npm install -g @speedkit/cli
21
21
  $ sk COMMAND
22
22
  running command...
23
23
  $ sk (--version)
24
- @speedkit/cli/3.31.1 linux-x64 node-v20.20.1
24
+ @speedkit/cli/3.31.2 linux-x64 node-v20.20.1
25
25
  $ sk --help [COMMAND]
26
26
  USAGE
27
27
  $ sk COMMAND
@@ -138,7 +138,7 @@ class GeneratePopConfig extends core_1.Command {
138
138
  const remoteConfig = await configService.getRemoteModule(moduleName);
139
139
  const result = await diffService.diffContent(moduleName, remoteConfig, // remoteContent
140
140
  popPrewarmingCode);
141
- const content = result.changedOrigins;
141
+ const content = result.updatedFile;
142
142
  const isEqual = result.diff;
143
143
  if (isEqual) {
144
144
  cliService.write(`created config is the same as the deployed one`);
@@ -43,8 +43,8 @@ class CustomerConfigHandler {
43
43
  return;
44
44
  }
45
45
  // todo: add changedThrowable, let the handler catch and decide what to do with it
46
- const { changedOrigins } = await this.diffService.diffContent(file.name, JSON.stringify(config.origins, null, 4), JSON.stringify(installResource.origins, null, 4));
47
- const origins = JSON.parse(changedOrigins);
46
+ const { updatedFile } = await this.diffService.diffContent(file.name, JSON.stringify(config.origins, null, 4), JSON.stringify(installResource.origins, null, 4));
47
+ const origins = JSON.parse(updatedFile);
48
48
  file.updateOrigins(origins);
49
49
  if (!(await this.cli.confirm("Update origins?", true))) {
50
50
  file.skipFile();
@@ -94,10 +94,10 @@ class InstallResourceHandler {
94
94
  await this.confirm(file, true);
95
95
  return;
96
96
  }
97
- const { changedOrigins, diff } = await this.diffService.diffContent(file.name, // fileName
97
+ const { updatedFile, diff } = await this.diffService.diffContent(file.name, // fileName
98
98
  installResource[file.remoteKey], // remote file content
99
99
  file.getContent());
100
- file.setContent(changedOrigins);
100
+ file.setContent(updatedFile);
101
101
  if (diff) {
102
102
  this.cli.writeWarning(`skipped ${file.name} (identical with remote)`);
103
103
  file.skipFile();
@@ -32,8 +32,8 @@ class ModuleHandler {
32
32
  await this.confirm(file, true);
33
33
  continue;
34
34
  }
35
- const { changedOrigins, diff } = await this.diffService.diffContent(file.name, remote, file.getContent());
36
- file.setContent(changedOrigins);
35
+ const { updatedFile, diff } = await this.diffService.diffContent(file.name, remote, file.getContent());
36
+ file.setContent(updatedFile);
37
37
  if (diff) {
38
38
  this.cli.writeWarning(`skipped ${file.name} (identical with remote)`);
39
39
  file.skipFile();
@@ -27,8 +27,8 @@ class ServerConfigHandler {
27
27
  const remoteConfig = JSON.parse(remote);
28
28
  // @ts-expect-error revision is unknown
29
29
  file.config.revision.version = remoteConfig.revision.version;
30
- const { changedOrigins, diff } = await this.diffService.diffContent(file.name, remote, file.getContent());
31
- file.setContent(changedOrigins);
30
+ const { updatedFile, diff } = await this.diffService.diffContent(file.name, remote, file.getContent());
31
+ file.setContent(updatedFile);
32
32
  if (diff) {
33
33
  this.cli.writeWarning(`skipped ${file.name} (identical with remote)`);
34
34
  file.skipFile();
@@ -7,7 +7,7 @@ export declare class DiffService {
7
7
  constructor(cli: CliService, diffExecutablePath?: string, diffExecutableTemplate?: string);
8
8
  diff(localPath: string, fileName: string, temporaryContent: string): Promise<boolean>;
9
9
  diffContent(fileName: string, firstContent: string, secondContent: string, diffSuffix?: string[]): Promise<{
10
- changedOrigins: string;
10
+ updatedFile: string;
11
11
  diff: boolean;
12
12
  }>;
13
13
  /**
@@ -26,8 +26,10 @@ class DiffService {
26
26
  const temporaryFirstFilePath = await this.writeContentToTemporalFile(`${fileName}-${diffSuffix[0]}`, firstContent);
27
27
  const temporarySecondFilePath = await this.writeContentToTemporalFile(`${fileName}-${diffSuffix[1]}`, secondContent);
28
28
  const diff = await this.executeDiff(temporaryFirstFilePath, temporarySecondFilePath);
29
- const changedFile = await (0, promises_1.readFile)(temporaryFirstFilePath, "utf-8");
30
- return { changedOrigins: changedFile, diff };
29
+ // return changes made in diffView
30
+ // eg adding changes from remote to safe locally
31
+ const changedFile = await (0, promises_1.readFile)(temporarySecondFilePath, "utf-8");
32
+ return { updatedFile: changedFile, diff };
31
33
  }
32
34
  /**
33
35
  * Returns a temporal directory path.
@@ -731,5 +731,5 @@
731
731
  ]
732
732
  }
733
733
  },
734
- "version": "3.31.1"
734
+ "version": "3.31.2"
735
735
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "3.31.1",
4
+ "version": "3.31.2",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"