@effect/tsgo 0.0.6 → 0.0.8

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/bin/effect-tsgo.js +13 -11
  2. package/package.json +8 -8
@@ -195732,7 +195732,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
195732
195732
  //#endregion
195733
195733
  //#region package.json
195734
195734
  var name = "@effect/tsgo";
195735
- var version = "0.0.6";
195735
+ var version = "0.0.8";
195736
195736
 
195737
195737
  //#endregion
195738
195738
  //#region src/setup/consts.ts
@@ -196610,14 +196610,16 @@ const patch = gen(function* () {
196610
196610
  const targetPath = yield* getNativePreviewBinaryPath;
196611
196611
  const backupPath = path.join(path.dirname(targetPath), path.basename(targetPath) + ".original");
196612
196612
  const ourBinaryPath = yield* getPackagedBinaryPath;
196613
- if (yield* fs.exists(backupPath)) {
196614
- yield* log("Binary is already patched (backup exists at " + backupPath + "). Skipping.");
196615
- return;
196616
- } else {
196617
- if (!(yield* fs.exists(targetPath))) return yield* fail$1(new MissingTargetBinaryError({ targetPath }));
196618
- yield* fs.rename(targetPath, backupPath).pipe(mapError(() => new BackupRestoreError({ reason: `Failed to back up original binary from ${targetPath} to ${backupPath}.` })));
196619
- yield* log("Backed up original binary to " + backupPath);
196620
- }
196613
+ if (!(yield* fs.exists(targetPath))) return yield* fail$1(new MissingTargetBinaryError({ targetPath }));
196614
+ let actualBackupPath = backupPath;
196615
+ let counter = 1;
196616
+ while (yield* fs.exists(actualBackupPath)) {
196617
+ if (counter > 100) return yield* fail$1(new BackupRestoreError({ reason: `Too many backup files exist (over 100). Please clean up old backups in ${path.dirname(targetPath)}.` }));
196618
+ actualBackupPath = backupPath + "." + counter;
196619
+ counter++;
196620
+ }
196621
+ yield* fs.rename(targetPath, actualBackupPath).pipe(mapError(() => new BackupRestoreError({ reason: `Failed to back up original binary from ${targetPath} to ${actualBackupPath}.` })));
196622
+ yield* log("Backed up original binary to " + actualBackupPath);
196621
196623
  yield* fs.copyFile(ourBinaryPath, targetPath).pipe(mapError(() => new CopyBinaryError({
196622
196624
  sourcePath: ourBinaryPath,
196623
196625
  targetPath
@@ -196640,7 +196642,7 @@ const unpatch = gen(function* () {
196640
196642
  const targetPath = yield* getNativePreviewBinaryPath;
196641
196643
  const backupPath = path.join(path.dirname(targetPath), path.basename(targetPath) + ".original");
196642
196644
  if (!(yield* fs.exists(backupPath))) {
196643
- yield* log("No backup found at " + backupPath + ". Nothing to restore.");
196645
+ yield* error("No backup found at " + backupPath + ". Nothing to restore.");
196644
196646
  return;
196645
196647
  }
196646
196648
  if (yield* fs.exists(targetPath)) {
@@ -196662,6 +196664,6 @@ make("tsgo").pipe(withSubcommands([
196662
196664
  unpatchCommand,
196663
196665
  getExePathCommand,
196664
196666
  setupCommand
196665
- ])).pipe(run({ version: "0.0.0" }), provide(layer), runMain());
196667
+ ])).pipe(run({ version }), provide(layer), runMain());
196666
196668
 
196667
196669
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,13 +21,13 @@
21
21
  "bin/"
22
22
  ],
23
23
  "optionalDependencies": {
24
- "@effect/tsgo-win32-x64": "0.0.6",
25
- "@effect/tsgo-win32-arm64": "0.0.6",
26
- "@effect/tsgo-linux-x64": "0.0.6",
27
- "@effect/tsgo-linux-arm64": "0.0.6",
28
- "@effect/tsgo-linux-arm": "0.0.6",
29
- "@effect/tsgo-darwin-x64": "0.0.6",
30
- "@effect/tsgo-darwin-arm64": "0.0.6"
24
+ "@effect/tsgo-win32-x64": "0.0.8",
25
+ "@effect/tsgo-win32-arm64": "0.0.8",
26
+ "@effect/tsgo-linux-x64": "0.0.8",
27
+ "@effect/tsgo-linux-arm64": "0.0.8",
28
+ "@effect/tsgo-linux-arm": "0.0.8",
29
+ "@effect/tsgo-darwin-x64": "0.0.8",
30
+ "@effect/tsgo-darwin-arm64": "0.0.8"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@effect/platform-node": "4.0.0-beta.11",