@getpochi/cli 0.5.87 → 0.5.89

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 +21 -20
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -27430,7 +27430,7 @@ __export(exports_SchemaAST, {
27430
27430
  symbolKeyword: () => symbolKeyword,
27431
27431
  stringKeyword: () => stringKeyword,
27432
27432
  required: () => required2,
27433
- rename: () => rename2,
27433
+ rename: () => rename,
27434
27434
  record: () => record2,
27435
27435
  pruneUndefined: () => pruneUndefined,
27436
27436
  pickAnnotations: () => pickAnnotations,
@@ -28909,7 +28909,7 @@ var BrandAnnotationId, SchemaIdAnnotationId, MessageAnnotationId, MissingMessage
28909
28909
  return _keyof(ast.to);
28910
28910
  }
28911
28911
  throw new Error(getASTUnsupportedSchemaErrorMessage(ast));
28912
- }, compose4 = (ab, cd) => new Transformation(ab, cd, composeTransformation), rename2 = (ast, mapping) => {
28912
+ }, compose4 = (ab, cd) => new Transformation(ab, cd, composeTransformation), rename = (ast, mapping) => {
28913
28913
  switch (ast._tag) {
28914
28914
  case "TypeLiteral": {
28915
28915
  const propertySignatureTransformations = [];
@@ -28928,11 +28928,11 @@ var BrandAnnotationId, SchemaIdAnnotationId, MessageAnnotationId, MissingMessage
28928
28928
  }), ast.indexSignatures), new TypeLiteralTransformation(propertySignatureTransformations));
28929
28929
  }
28930
28930
  case "Union":
28931
- return Union.make(ast.types.map((ast2) => rename2(ast2, mapping)));
28931
+ return Union.make(ast.types.map((ast2) => rename(ast2, mapping)));
28932
28932
  case "Suspend":
28933
- return new Suspend(() => rename2(ast.f(), mapping));
28933
+ return new Suspend(() => rename(ast.f(), mapping));
28934
28934
  case "Transformation":
28935
- return compose4(ast, rename2(typeAST(ast), mapping));
28935
+ return compose4(ast, rename(typeAST(ast), mapping));
28936
28936
  }
28937
28937
  throw new Error(getASTUnsupportedRenameSchemaErrorMessage(ast));
28938
28938
  }, formatKeyword = (ast) => getOrElse2(getExpected(ast), () => ast._tag), getOrElseExpected = (ast) => getTitleAnnotation(ast).pipe(orElse2(() => getDescriptionAnnotation(ast)), orElse2(() => getAutoTitleAnnotation(ast)), map3((s5) => s5 + getBrands(ast))), getExpected = (ast) => orElse2(getIdentifierAnnotation(ast), () => getOrElseExpected(ast)), pruneUndefined = (ast, self2, onTransformation) => {
@@ -30418,7 +30418,7 @@ __export(exports_Schema, {
30418
30418
  serializableSchema: () => serializableSchema,
30419
30419
  requiredToOptional: () => requiredToOptional,
30420
30420
  required: () => required3,
30421
- rename: () => rename3,
30421
+ rename: () => rename2,
30422
30422
  propertySignature: () => propertySignature,
30423
30423
  positiveBigInt: () => positiveBigInt,
30424
30424
  positiveBigDecimal: () => positiveBigDecimal,
@@ -31761,7 +31761,7 @@ var TypeId22, variance8, makeStandardResult = (exit3) => isSuccess2(exit3) ? exi
31761
31761
  }
31762
31762
  }
31763
31763
  return none2();
31764
- }, filterEffect, transformOrFail, transform3, attachPropertySignature, annotations2, rename3, TrimmedSchemaId, trimmed = (annotations3) => (self2) => self2.pipe(filter15((a3) => a3 === a3.trim(), {
31764
+ }, filterEffect, transformOrFail, transform3, attachPropertySignature, annotations2, rename2, TrimmedSchemaId, trimmed = (annotations3) => (self2) => self2.pipe(filter15((a3) => a3 === a3.trim(), {
31765
31765
  schemaId: TrimmedSchemaId,
31766
31766
  title: "trimmed",
31767
31767
  description: "a string with no leading or trailing whitespace",
@@ -33563,7 +33563,7 @@ var init_Schema = __esm(() => {
33563
33563
  return make50(new Transformation(schema.ast, annotations2 ? mergeSchemaAnnotations(ast, annotations2) : ast, new TypeLiteralTransformation([new PropertySignatureTransformation(key, key, () => some3(value4), () => none2())])));
33564
33564
  });
33565
33565
  annotations2 = /* @__PURE__ */ dual(2, (self2, annotations3) => self2.annotations(annotations3));
33566
- rename3 = /* @__PURE__ */ dual(2, (self2, mapping) => make50(rename2(self2.ast, mapping)));
33566
+ rename2 = /* @__PURE__ */ dual(2, (self2, mapping) => make50(rename(self2.ast, mapping)));
33567
33567
  TrimmedSchemaId = /* @__PURE__ */ Symbol.for("effect/SchemaId/Trimmed");
33568
33568
  MaxLengthSchemaId2 = MaxLengthSchemaId;
33569
33569
  MinLengthSchemaId2 = MinLengthSchemaId;
@@ -65596,7 +65596,7 @@ __export(exports_Schema2, {
65596
65596
  serializableSchema: () => serializableSchema,
65597
65597
  requiredToOptional: () => requiredToOptional,
65598
65598
  required: () => required3,
65599
- rename: () => rename3,
65599
+ rename: () => rename2,
65600
65600
  propertySignature: () => propertySignature,
65601
65601
  positiveBigInt: () => positiveBigInt,
65602
65602
  positiveBigDecimal: () => positiveBigDecimal,
@@ -102769,7 +102769,7 @@ var require_installer = __commonJS((exports, module) => {
102769
102769
  var debug2 = tabtabDebug("tabtab:installer");
102770
102770
  var readFile2 = promisify(fs2.readFile);
102771
102771
  var writeFile2 = promisify(fs2.writeFile);
102772
- var unlink = promisify(fs2.unlink);
102772
+ var unlink2 = promisify(fs2.unlink);
102773
102773
  var {
102774
102774
  BASH_LOCATION,
102775
102775
  FISH_LOCATION,
@@ -102948,7 +102948,7 @@ ${sourceLineForShell(scriptname)}`);
102948
102948
  }
102949
102949
  const completionScript = untildify(path4.join(COMPLETION_DIR, `${name17}.${shellExtension()}`));
102950
102950
  if (await exists7(completionScript)) {
102951
- await unlink(completionScript);
102951
+ await unlink2(completionScript);
102952
102952
  console.log("=> Removed completion script (%s)", completionScript);
102953
102953
  }
102954
102954
  const tabtabScript = untildify(path4.join(COMPLETION_DIR, `${TABTAB_SCRIPT_NAME}.${shellExtension()}`));
@@ -139560,7 +139560,7 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
139560
139560
  module: "FileSystem",
139561
139561
  method,
139562
139562
  cause: cause3
139563
- }), access5, copy4, copyFile2, chmod2, chown2, link3, makeDirectory, makeTempDirectoryFactory = (method) => {
139563
+ }), access5, copy4, copyFile3, chmod2, chown2, link3, makeDirectory, makeTempDirectoryFactory = (method) => {
139564
139564
  const nodeMkdtemp = effectify2(NFS2.mkdtemp, handleErrnoException("FileSystem", method), handleBadArgument(method));
139565
139565
  return (options4) => suspend3(() => {
139566
139566
  const prefix3 = options4?.prefix ?? "";
@@ -139601,7 +139601,7 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
139601
139601
  } catch (err) {
139602
139602
  resume2(fail10(handleBadArgument("readFile")(err)));
139603
139603
  }
139604
- }), readLink, realPath, rename5, makeFileInfo = (stat3) => ({
139604
+ }), readLink, realPath, rename4, makeFileInfo = (stat3) => ({
139605
139605
  type: stat3.isFile() ? "File" : stat3.isDirectory() ? "Directory" : stat3.isSymbolicLink() ? "SymbolicLink" : stat3.isBlockDevice() ? "BlockDevice" : stat3.isCharacterDevice() ? "CharacterDevice" : stat3.isFIFO() ? "FIFO" : stat3.isSocket() ? "Socket" : "Unknown",
139606
139606
  mtime: fromNullable2(stat3.mtime),
139607
139607
  atime: fromNullable2(stat3.atime),
@@ -139703,7 +139703,7 @@ var init_fileSystem2 = __esm(() => {
139703
139703
  recursive: true
139704
139704
  });
139705
139705
  })();
139706
- copyFile2 = /* @__PURE__ */ (() => {
139706
+ copyFile3 = /* @__PURE__ */ (() => {
139707
139707
  const nodeCopyFile = /* @__PURE__ */ effectify2(NFS2.copyFile, /* @__PURE__ */ handleErrnoException("FileSystem", "copyFile"), /* @__PURE__ */ handleBadArgument("copyFile"));
139708
139708
  return (fromPath, toPath) => nodeCopyFile(fromPath, toPath);
139709
139709
  })();
@@ -139861,7 +139861,7 @@ var init_fileSystem2 = __esm(() => {
139861
139861
  const nodeRealPath = /* @__PURE__ */ effectify2(NFS2.realpath, /* @__PURE__ */ handleErrnoException("FileSystem", "realPath"), /* @__PURE__ */ handleBadArgument("realPath"));
139862
139862
  return (path14) => nodeRealPath(path14);
139863
139863
  })();
139864
- rename5 = /* @__PURE__ */ (() => {
139864
+ rename4 = /* @__PURE__ */ (() => {
139865
139865
  const nodeRename = /* @__PURE__ */ effectify2(NFS2.rename, /* @__PURE__ */ handleErrnoException("FileSystem", "rename"), /* @__PURE__ */ handleBadArgument("rename"));
139866
139866
  return (oldPath, newPath) => nodeRename(oldPath, newPath);
139867
139867
  })();
@@ -139886,7 +139886,7 @@ var init_fileSystem2 = __esm(() => {
139886
139886
  chmod: chmod2,
139887
139887
  chown: chown2,
139888
139888
  copy: copy4,
139889
- copyFile: copyFile2,
139889
+ copyFile: copyFile3,
139890
139890
  link: link3,
139891
139891
  makeDirectory,
139892
139892
  makeTempDirectory,
@@ -139899,7 +139899,7 @@ var init_fileSystem2 = __esm(() => {
139899
139899
  readLink,
139900
139900
  realPath,
139901
139901
  remove: remove21,
139902
- rename: rename5,
139902
+ rename: rename4,
139903
139903
  stat: stat3,
139904
139904
  symlink: symlink2,
139905
139905
  truncate: truncate3,
@@ -388282,9 +388282,10 @@ class PochiConfigFile {
388282
388282
  content = applyEdits(content, edits);
388283
388283
  const tmp = path2.join(os.tmpdir(), `${path2.basename(this.configFilePath)}.${randomUUID()}.tmp`);
388284
388284
  await fsPromise.writeFile(tmp, content);
388285
- await fsPromise.rename(tmp, this.configFilePath);
388285
+ await fsPromise.copyFile(tmp, this.configFilePath);
388286
+ await fsPromise.unlink(tmp);
388286
388287
  } catch (err) {
388287
- logger.error("Failed to save config file", err);
388288
+ logger.error("Failed to save config file", JSON.stringify(err));
388288
388289
  }
388289
388290
  }
388290
388291
  updateConfig = async (newConfig) => {
@@ -404808,7 +404809,7 @@ var {
404808
404809
  // package.json
404809
404810
  var package_default = {
404810
404811
  name: "@getpochi/cli",
404811
- version: "0.5.87",
404812
+ version: "0.5.89",
404812
404813
  type: "module",
404813
404814
  bin: {
404814
404815
  pochi: "src/cli.ts"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpochi/cli",
3
- "version": "0.5.87",
3
+ "version": "0.5.89",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pochi": "dist/cli.js"