recappi 0.1.32 → 0.1.34

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/dist/index.js CHANGED
@@ -20102,6 +20102,7 @@ import {
20102
20102
  statSync,
20103
20103
  writeFileSync
20104
20104
  } from "fs";
20105
+ import { createHash } from "crypto";
20105
20106
  import { createRequire as createRequire2 } from "module";
20106
20107
  import { homedir } from "os";
20107
20108
  import { dirname, join as join2 } from "path";
@@ -20659,6 +20660,7 @@ function assertRecordingPermissions(permissions) {
20659
20660
  const blocked = permissions.find((permission) => {
20660
20661
  if (permission.status === "granted") return false;
20661
20662
  if (permission.name === "microphone" && permission.status === "unknown") return false;
20663
+ if (permission.name === "screen_recording" && permission.status === "unknown") return false;
20662
20664
  return true;
20663
20665
  });
20664
20666
  if (!blocked) return;
@@ -20766,16 +20768,21 @@ function stableDarwinHelperAppPath(opts = {}) {
20766
20768
  return join2(base, SIDECAR_APP_BUNDLE_NAME);
20767
20769
  }
20768
20770
  function helperSourceSignature(sourceApp) {
20769
- const executable = statSync(darwinAppExecutablePath(sourceApp));
20770
- const info = statSync(join2(sourceApp, "Contents", "Info.plist"));
20771
+ const executablePath = darwinAppExecutablePath(sourceApp);
20772
+ const infoPath = join2(sourceApp, "Contents", "Info.plist");
20773
+ const signaturePath = join2(sourceApp, "Contents", "_CodeSignature", "CodeResources");
20771
20774
  return JSON.stringify({
20772
20775
  app: SIDECAR_APP_BUNDLE_NAME,
20773
- executableSize: executable.size,
20774
- executableMtimeMs: executable.mtimeMs,
20775
- infoSize: info.size,
20776
- infoMtimeMs: info.mtimeMs
20776
+ executable: fileDigest(executablePath),
20777
+ info: fileDigest(infoPath),
20778
+ codeSignature: existsSync(signaturePath) ? fileDigest(signaturePath) : null
20777
20779
  });
20778
20780
  }
20781
+ function fileDigest(path6) {
20782
+ const hash2 = createHash("sha256");
20783
+ hash2.update(readFileSync2(path6));
20784
+ return hash2.digest("hex");
20785
+ }
20779
20786
  function readTextIfExists(path6) {
20780
20787
  try {
20781
20788
  return readFileSync2(path6, "utf8");