replicas-cli 0.2.173 → 0.2.174

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/index.mjs +22 -10
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -8060,14 +8060,25 @@ var SANDBOX_LIFECYCLE = {
8060
8060
  AUTO_DELETE_MINUTES: -1,
8061
8061
  SSH_TOKEN_EXPIRATION_MINUTES: 3 * 60
8062
8062
  };
8063
- var SANDBOX_PATHS = {
8064
- HOME_DIR: "/home/ubuntu",
8065
- WORKSPACES_DIR: "/home/ubuntu/workspaces",
8066
- REPLICAS_DIR: "/home/ubuntu/.replicas",
8067
- REPLICAS_FILES_DIR: "/home/ubuntu/.replicas/files",
8068
- REPLICAS_FILES_DISPLAY_DIR: "~/.replicas/files",
8069
- REPLICAS_RUNTIME_ENV_FILE: "/home/ubuntu/.replicas/runtime-env.sh"
8070
- };
8063
+ function buildPaths(homeDir) {
8064
+ return {
8065
+ HOME_DIR: homeDir,
8066
+ WORKSPACES_DIR: `${homeDir}/workspaces`,
8067
+ REPLICAS_DIR: `${homeDir}/.replicas`,
8068
+ REPLICAS_FILES_DIR: `${homeDir}/.replicas/files`,
8069
+ REPLICAS_RUNTIME_ENV_FILE: `${homeDir}/.replicas/runtime-env.sh`
8070
+ };
8071
+ }
8072
+ var DAYTONA_PATHS = buildPaths("/home/ubuntu");
8073
+ var E2B_PATHS = buildPaths("/home/user");
8074
+ function getSandboxPaths(providerId) {
8075
+ switch (providerId) {
8076
+ case "daytona":
8077
+ return DAYTONA_PATHS;
8078
+ case "e2b":
8079
+ return E2B_PATHS;
8080
+ }
8081
+ }
8071
8082
 
8072
8083
  // ../shared/src/urls.ts
8073
8084
  function getWorkspaceDashboardUrl(workspaceId, options = {}) {
@@ -9380,7 +9391,8 @@ async function codeCommand(workspaceName) {
9380
9391
  proxyCommand: sshProxyCommand
9381
9392
  });
9382
9393
  console.log(chalk6.green(`\u2713 SSH config entry created: ${hostAlias}`));
9383
- const remotePath = repoName ? `${SANDBOX_PATHS.WORKSPACES_DIR}/${repoName}` : SANDBOX_PATHS.HOME_DIR;
9394
+ const paths = getSandboxPaths(workspace.sandbox_provider ?? "daytona");
9395
+ const remotePath = repoName ? `${paths.WORKSPACES_DIR}/${repoName}` : paths.HOME_DIR;
9384
9396
  const ideCommand = getIdeCommand();
9385
9397
  const fullCommand = `${ideCommand} --remote ssh-remote+${hostAlias} ${remotePath}`;
9386
9398
  console.log(chalk6.blue(`
@@ -14823,7 +14835,7 @@ Deleted file ${pathOrId}.
14823
14835
  }
14824
14836
 
14825
14837
  // src/index.ts
14826
- var CLI_VERSION = "0.2.173";
14838
+ var CLI_VERSION = "0.2.174";
14827
14839
  function parseBooleanOption(value) {
14828
14840
  if (value === "true") return true;
14829
14841
  if (value === "false") return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.173",
3
+ "version": "0.2.174",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {