@absolutejs/absolute 0.19.0-beta.1091 → 0.19.0-beta.1092

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/cli/index.js CHANGED
@@ -178953,7 +178953,7 @@ var formatServerBootDiagnostic = (output, serverEntry) => {
178953
178953
  ].join(`
178954
178954
  `);
178955
178955
  };
178956
- var HEAP_SNAPSHOT_PRELOAD = `process.on('SIGUSR2', () => {
178956
+ var DEV_CHILD_PRELOAD = `process.on('SIGUSR2', () => {
178957
178957
  try {
178958
178958
  const file = 'heap-' + process.pid + '-' + Date.now() + '.heapsnapshot';
178959
178959
  Bun.write(file, Bun.generateHeapSnapshot('v8'));
@@ -178962,6 +178962,13 @@ var HEAP_SNAPSHOT_PRELOAD = `process.on('SIGUSR2', () => {
178962
178962
  console.error('[absolute] heap snapshot failed:', error);
178963
178963
  }
178964
178964
  });
178965
+ const absoluteDevInitialPpid = process.ppid;
178966
+ const absoluteDevParentWatch = setInterval(() => {
178967
+ if (process.ppid === absoluteDevInitialPpid) return;
178968
+ console.error('[absolute] dev CLI (pid ' + absoluteDevInitialPpid + ') is gone \u2014 shutting down so the port is not held by an orphaned server');
178969
+ process.exit(0);
178970
+ }, 1000);
178971
+ if (typeof absoluteDevParentWatch.unref === 'function') absoluteDevParentWatch.unref();
178965
178972
  `;
178966
178973
  var ANSI_LOG_REGEX = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[[0-?]*[ -/]*[@-~]`, "g");
178967
178974
  var confirmPrompt = (message, defaultYes = true) => {
@@ -179228,7 +179235,7 @@ var dev = async (serverEntry, configPath2) => {
179228
179235
  const heapPreloadPath = join6(tmpdir(), `absolute-heap-${process.pid}.ts`);
179229
179236
  let heapSnapshotEnabled = false;
179230
179237
  try {
179231
- writeFileSync4(heapPreloadPath, HEAP_SNAPSHOT_PRELOAD);
179238
+ writeFileSync4(heapPreloadPath, DEV_CHILD_PRELOAD);
179232
179239
  heapSnapshotEnabled = true;
179233
179240
  } catch {
179234
179241
  heapSnapshotEnabled = false;