deplhoy 0.3.0 → 0.3.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/dist/core.js CHANGED
@@ -5,7 +5,7 @@ import { collectFiles, defaultName, detectBuildDir, formatBytes, MAX_VERSION_BYT
5
5
  import { DEFAULT_API, readAccount, readProject, readProjects, writeProject } from './config.js';
6
6
  import { gitInfo } from './git.js';
7
7
  import { scanFiles } from './secrets.js';
8
- export const VERSION = '0.3.0';
8
+ export const VERSION = '0.3.1';
9
9
  export const BEHAVIOR_MAX_BYTES = 4 * 1024; // same limit as the API
10
10
  export class CliError extends Error {
11
11
  code;
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /* deplhoy CLI. L1: login, logout, publish, list. L2: mcp, setup, --sitemap and --behavior. L4: comments, resolve. */
3
3
  import { spawn } from 'node:child_process';
4
+ import { realpathSync } from 'node:fs';
5
+ import { fileURLToPath } from 'node:url';
4
6
  import { hostname } from 'node:os';
5
7
  import { parseArgs } from 'node:util';
6
8
  import { DEFAULT_API, readAccount, writeAccount } from './config.js';
@@ -181,6 +183,13 @@ function openInBrowser(url) {
181
183
  }
182
184
  catch { /* the URL is printed anyway */ }
183
185
  }
184
- const isMain = process.argv[1] && import.meta.url === new URL(`file://${process.argv[1]}`).href;
186
+ /* npx and npm install run the CLI through a symlink (node_modules/.bin/deplhoy): compare real paths */
187
+ const realPath = (p) => { try {
188
+ return realpathSync(p);
189
+ }
190
+ catch {
191
+ return p;
192
+ } };
193
+ const isMain = !!process.argv[1] && realPath(process.argv[1]) === realPath(fileURLToPath(import.meta.url));
185
194
  if (isMain)
186
195
  run(process.argv.slice(2)).then((code) => { process.exitCode = code; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deplhoy",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Publish prototypes from your agent and get a URL. CLI + MCP server.",
5
5
  "keywords": [
6
6
  "prototype",