devcon-cli 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -1,15 +1 @@
1
1
  # devcon-cli
2
-
3
- To install dependencies:
4
-
5
- ```bash
6
- bun install
7
- ```
8
-
9
- To run:
10
-
11
- ```bash
12
- bun run index.ts
13
- ```
14
-
15
- This project was created using `bun init` in bun v1.3.8. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var __require = import.meta.require;
6
6
  import { resolve } from "path";
7
7
  var HELP = `devcon - devcontainer CLI with port forwarding
8
8
 
9
- Usage: devcon-cli [options] <command> [args...]
9
+ Usage: devcon [options] <command> [args...]
10
10
 
11
11
  Options:
12
12
  --workspace-folder <path> Path to workspace (default: current directory)
@@ -557,7 +557,10 @@ async function commandUp(opts) {
557
557
  debug("Using runtime:", runtime);
558
558
  info("Deploying agent...");
559
559
  const agentFile = runtime === "bun" ? "agent-bun.js" : "agent-node.js";
560
- const agentPath = new URL(`../../dist/${agentFile}`, import.meta.url).pathname;
560
+ let agentPath = `${import.meta.dir}/${agentFile}`;
561
+ if (!await Bun.file(agentPath).exists()) {
562
+ agentPath = `${import.meta.dir}/../../dist/${agentFile}`;
563
+ }
561
564
  const agentCode = await Bun.file(agentPath).text();
562
565
  await dockerWriteFile(containerId, AGENT_PATH3, agentCode);
563
566
  await dockerChmod(containerId, AGENT_PATH3);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devcon-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Devcontainer CLI with automatic port forwarding",
5
5
  "type": "module",
6
6
  "scripts": {