@astryxdesign/cli 0.7.8-canary.30b1896 → 0.7.8-canary.36cde5e

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.
@@ -345,6 +345,9 @@ function failedHandler(message) {
345
345
  * process.exitCode, stdout, and every continuation the handler creates. A
346
346
  * timeout aborts the supplied signal, gives the handler one short turn to
347
347
  * observe it, then terminates the isolate before the next handler starts.
348
+ * `timeoutMs` is the handler's own time and starts once its module has
349
+ * loaded. Starting the worker and loading the module have the default
350
+ * deadline.
348
351
  *
349
352
  * @param {Extract<HandlerEntry, {kind: 'handler'}>} entry
350
353
  * @param {GapReport} report cloned before this call
@@ -393,7 +396,8 @@ async function callHandler(entry, report, timeoutMs = HANDLER_TIMEOUT_MS) {
393
396
  .finally(() => resolve(outcome));
394
397
  };
395
398
 
396
- const beginTimeout = () => {
399
+ /** @param {number} deadlineMs */
400
+ const beginTimeout = deadlineMs => {
397
401
  if (timeout !== undefined) clearTimeout(timeout);
398
402
  timeout = setTimeout(() => {
399
403
  if (settled) return;
@@ -407,13 +411,13 @@ async function callHandler(entry, report, timeoutMs = HANDLER_TIMEOUT_MS) {
407
411
  () => finish(timeoutOutcome),
408
412
  HANDLER_ABORT_GRACE_MS,
409
413
  );
410
- }, timeoutMs);
414
+ }, deadlineMs);
411
415
  };
412
416
 
413
417
  worker.on('message', message => {
414
418
  if (settled || timedOut) return;
415
419
  if (message?.kind === 'ready') {
416
- beginTimeout();
420
+ beginTimeout(timeoutMs);
417
421
  return;
418
422
  }
419
423
  if (message?.kind === 'exit-code') {
@@ -458,7 +462,8 @@ async function callHandler(entry, report, timeoutMs = HANDLER_TIMEOUT_MS) {
458
462
  finish(failedHandler(`Handler called process.exit(${String(code)}).`));
459
463
  });
460
464
 
461
- beginTimeout();
465
+ // A short handler budget must not cover a slow start on a busy machine.
466
+ beginTimeout(Math.max(timeoutMs, HANDLER_TIMEOUT_MS));
462
467
  });
463
468
  }
464
469
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.7.8-canary.30b1896",
3
+ "version": "0.7.8-canary.36cde5e",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -124,10 +124,10 @@
124
124
  "zod": "^4.4.3"
125
125
  },
126
126
  "peerDependencies": {
127
- "@astryxdesign/charts": "0.7.8-canary.30b1896",
128
- "@astryxdesign/core": "0.7.8-canary.30b1896",
129
- "@astryxdesign/lab": "0.7.8-canary.30b1896",
130
- "@astryxdesign/theme-neutral": "0.7.8-canary.30b1896"
127
+ "@astryxdesign/charts": "0.7.8-canary.36cde5e",
128
+ "@astryxdesign/core": "0.7.8-canary.36cde5e",
129
+ "@astryxdesign/lab": "0.7.8-canary.36cde5e",
130
+ "@astryxdesign/theme-neutral": "0.7.8-canary.36cde5e"
131
131
  },
132
132
  "peerDependenciesMeta": {
133
133
  "@astryxdesign/charts": {
@@ -144,10 +144,10 @@
144
144
  }
145
145
  },
146
146
  "devDependencies": {
147
- "@astryxdesign/charts": "0.7.8-canary.30b1896",
148
- "@astryxdesign/core": "0.7.8-canary.30b1896",
149
- "@astryxdesign/lab": "0.7.8-canary.30b1896",
150
- "@astryxdesign/theme-neutral": "0.7.8-canary.30b1896",
147
+ "@astryxdesign/charts": "0.7.8-canary.36cde5e",
148
+ "@astryxdesign/core": "0.7.8-canary.36cde5e",
149
+ "@astryxdesign/lab": "0.7.8-canary.36cde5e",
150
+ "@astryxdesign/theme-neutral": "0.7.8-canary.36cde5e",
151
151
  "@heroicons/react": "^2.2.0",
152
152
  "@stylexjs/stylex": "^0.19.0",
153
153
  "@types/babel__core": "^7.20.5",