ds-harness-remote 0.3.30 → 0.3.31

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
@@ -13212,7 +13212,7 @@ function normalizeServerUrl(value) {
13212
13212
  }
13213
13213
 
13214
13214
  // src/version.ts
13215
- var PLUGIN_VERSION = "0.3.30";
13215
+ var PLUGIN_VERSION = "0.3.31";
13216
13216
 
13217
13217
  // src/server-api.ts
13218
13218
  var HostServerApi = class {
@@ -13883,6 +13883,7 @@ var ClientModeRuntime = class {
13883
13883
  ...this.proxySwitch.status(),
13884
13884
  connected: this.connected !== void 0,
13885
13885
  transport: this.connected?.client.getStats().mode ?? "Disconnected",
13886
+ preferredTransports: this.config.forceRelay ? ["relay"] : ["lan", "p2p", "turn", "relay"],
13886
13887
  remoteFeatures: this.connected?.features ?? remoteHostFeatures(),
13887
13888
  ...this.pendingWorkspaceSelection === void 0 ? {} : { workspaceSelection: { ...this.pendingWorkspaceSelection } },
13888
13889
  hostAuthorizationAvailable: this.host !== void 0,
@@ -16948,11 +16949,16 @@ function shortId5(value) {
16948
16949
  }
16949
16950
 
16950
16951
  // src/remote-file-content-provider.ts
16951
- function createRemoteFileContentProvider(call) {
16952
+ var REMOTE_FILE_SAVE_AS_MAX_BYTES = 100 * 1024 * 1024;
16953
+ function createRemoteFileContentProvider(call, options = {}) {
16952
16954
  return {
16953
16955
  id: "dsh-remote-files",
16954
16956
  priority: 1e4,
16955
16957
  supports: () => true,
16958
+ saveAsAllowed: () => ({
16959
+ allowed: currentSaveAsAllowed(options.saveAsAllowed),
16960
+ maxBytes: options.saveAsMaxBytes ?? REMOTE_FILE_SAVE_AS_MAX_BYTES
16961
+ }),
16956
16962
  async stat(locator, signal) {
16957
16963
  const value = await call("fileviewer.stat", { path: locator }, signal);
16958
16964
  if (!value.exists) return void 0;
@@ -17001,6 +17007,9 @@ function createRemoteFileContentProvider(call) {
17001
17007
  }
17002
17008
  };
17003
17009
  }
17010
+ function currentSaveAsAllowed(value) {
17011
+ return typeof value === "function" ? value() : value === true;
17012
+ }
17004
17013
  function decodeBase64(value) {
17005
17014
  const binary = atob(value);
17006
17015
  const bytes = new Uint8Array(binary.length);