@fern-api/generator-cli 0.9.4 → 0.9.5

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.
Files changed (2) hide show
  1. package/dist/cli.js +10 -5
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -20098,7 +20098,7 @@ var init_diff3 = __esm({
20098
20098
  }
20099
20099
  });
20100
20100
 
20101
- // ../../node_modules/.pnpm/@fern-api+replay@0.10.1/node_modules/@fern-api/replay/dist/index.js
20101
+ // ../../node_modules/.pnpm/@fern-api+replay@0.10.2/node_modules/@fern-api/replay/dist/index.js
20102
20102
  var dist_exports = {};
20103
20103
  __export(dist_exports, {
20104
20104
  FERN_BOT_EMAIL: () => FERN_BOT_EMAIL2,
@@ -21063,7 +21063,7 @@ function status(outputDir) {
21063
21063
  }
21064
21064
  var import_fs6, import_path8, import_yaml, import_crypto, import_promises4, import_os, import_path9, import_fs7, import_path10, import_crypto2, import_fs8, import_path11, import_yaml2, import_crypto3, import_fs9, import_path12, import_fs10, __defProp3, __getOwnPropNames3, __esm3, __export3, GitClient_exports, GitClient, init_GitClient, HybridReconstruction_exports, init_HybridReconstruction, FERN_BOT_NAME2, FERN_BOT_EMAIL2, FERN_BOT_LOGIN2, FERN_SUPPORT_NAMES, LOCKFILE_HEADER, LockfileNotFoundError, LockfileManager, INFRASTRUCTURE_FILES, ReplayDetector, CONFLICT_OPENER, CONFLICT_SEPARATOR, CONFLICT_CLOSER, BINARY_EXTENSIONS, ReplayApplicator, ReplayCommitter, ReplayService, FernignoreMigrator, REPLAY_FERNIGNORE_ENTRIES, GITATTRIBUTES_ENTRIES, EMPTY_RESULT;
21065
21065
  var init_dist3 = __esm({
21066
- "../../node_modules/.pnpm/@fern-api+replay@0.10.1/node_modules/@fern-api/replay/dist/index.js"() {
21066
+ "../../node_modules/.pnpm/@fern-api+replay@0.10.2/node_modules/@fern-api/replay/dist/index.js"() {
21067
21067
  "use strict";
21068
21068
  init_esm4();
21069
21069
  import_fs6 = require("fs");
@@ -21842,9 +21842,10 @@ var init_dist3 = __esm({
21842
21842
  const resolvedPath = await this.resolveFilePath(filePath, baseGen.tree_hash, currentTreeHash);
21843
21843
  const base = await this.git.showFile(baseGen.tree_hash, filePath);
21844
21844
  const theirs = await this.applyPatchToContent(base, patch.patch_content, filePath, tempGit, tempDir);
21845
- if (theirs) {
21845
+ const effectiveTheirs = theirs ?? await (0, import_promises4.readFile)((0, import_path9.join)(this.outputDir, resolvedPath), "utf-8").catch(() => null);
21846
+ if (effectiveTheirs) {
21846
21847
  this.fileTheirsAccumulator.set(resolvedPath, {
21847
- content: theirs,
21848
+ content: effectiveTheirs,
21848
21849
  baseGeneration: patch.base_generation
21849
21850
  });
21850
21851
  }
@@ -21888,8 +21889,12 @@ var init_dist3 = __esm({
21888
21889
  };
21889
21890
  } catch {
21890
21891
  for (const [resolvedPath, content] of snapshots) {
21892
+ const fullPath = (0, import_path9.join)(this.outputDir, resolvedPath);
21891
21893
  if (content != null) {
21892
- await (0, import_promises4.writeFile)((0, import_path9.join)(this.outputDir, resolvedPath), content);
21894
+ await (0, import_promises4.writeFile)(fullPath, content);
21895
+ } else {
21896
+ await (0, import_promises4.unlink)(fullPath).catch(() => {
21897
+ });
21893
21898
  }
21894
21899
  }
21895
21900
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/generator-cli",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/fern-api/fern.git",
@@ -22,7 +22,7 @@
22
22
  "**"
23
23
  ],
24
24
  "dependencies": {
25
- "@fern-api/replay": "^0.10.1",
25
+ "@fern-api/replay": "0.10.2",
26
26
  "@octokit/rest": "^22.0.1",
27
27
  "es-toolkit": "^1.45.1",
28
28
  "tmp-promise": "^3.0.3"