@isomorph.ai/app-sdk 1.13.0 → 1.13.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.
Files changed (2) hide show
  1. package/dist/runtime.js +14 -1
  2. package/package.json +1 -1
package/dist/runtime.js CHANGED
@@ -54,6 +54,7 @@ import { createServer } from 'node:http';
54
54
  import { readFile, readdir, stat } from 'node:fs/promises';
55
55
  import { register } from 'node:module';
56
56
  import { join, resolve } from 'node:path';
57
+ import { realpathSync } from 'node:fs';
57
58
  import { pathToFileURL } from 'node:url';
58
59
  import { createClient, IsomorphError } from './index.js';
59
60
  import { userGroupsFromHeader } from './user-groups.js';
@@ -629,7 +630,19 @@ export function runJobFromArguments(argv = process.argv.slice(2)) {
629
630
  }
630
631
  return undefined;
631
632
  }
632
- const entry = process.argv[1] ? pathToFileURL(process.argv[1]).href : '';
633
+ // Node resolves this module's URL through any symlink in its path, while
634
+ // process.argv[1] is the path the starter typed. On macOS /tmp and /var are
635
+ // symlinks, so a gate or `isomorph dev` started from an app root under them
636
+ // handed a path whose URL never matched, and the runtime loaded as a library
637
+ // and exited 0 without a word (the gate reported "exited before it
638
+ // answered", 2026-10-06). Compare the real path, as Node did.
639
+ const entryPath = process.argv[1] ? (() => { try {
640
+ return realpathSync(process.argv[1]);
641
+ }
642
+ catch {
643
+ return process.argv[1];
644
+ } })() : '';
645
+ const entry = entryPath ? pathToFileURL(entryPath).href : '';
633
646
  if (import.meta.url === entry) {
634
647
  // Extensionless relative imports in the app's server code resolve to
635
648
  // their .ts files (runtime-hooks.ts); registered before any app module
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isomorph.ai/app-sdk",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",