@superblocksteam/cli 2.0.110 → 2.0.111-next.0

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 (107) hide show
  1. package/README.md +1 -1
  2. package/bin/run.js +3 -1
  3. package/dist/{acorn-QRHEJZ4Y.js → acorn-SLEBXOPM.js} +3 -3
  4. package/dist/{angular-E7FCGLEO.js → angular-6RC4UUQO.js} +3 -3
  5. package/dist/{api-F7VFMVH5.js → api-SNLSSH3U.js} +4 -4
  6. package/dist/{babel-XU2VNNSQ.js → babel-ASTIWI3P.js} +3 -3
  7. package/dist/{chunk-X2O46BBJ.js → chunk-2X5VDGUL.js} +6 -6
  8. package/dist/{chunk-VUXGBCHS.js → chunk-5QM3EEXH.js} +4 -4
  9. package/dist/{chunk-42MJC4KH.js → chunk-634XQVTI.js} +4 -4
  10. package/dist/{chunk-H427LM2L.js → chunk-6XMCVOST.js} +3 -3
  11. package/dist/{chunk-Y5UCK4QB.js → chunk-AYW7EDEX.js} +3 -3
  12. package/dist/{chunk-Z64OZ4VQ.js → chunk-E4SP3S63.js} +4 -4
  13. package/dist/{chunk-UQQWHXCE.js → chunk-E7KUQ4FE.js} +4 -4
  14. package/dist/{chunk-XBQXSTNW.js → chunk-HOSXK2Y6.js} +1736 -522
  15. package/dist/{chunk-XBQXSTNW.js.map → chunk-HOSXK2Y6.js.map} +1 -1
  16. package/dist/{chunk-QQTIZ3JW.js → chunk-HY7UBGMX.js} +3 -3
  17. package/dist/{chunk-E33HPBUC.js → chunk-MNJJSKHZ.js} +2 -2
  18. package/dist/{chunk-SOVZ4MKE.js → chunk-SKMNWLPY.js} +3 -3
  19. package/dist/{chunk-JUTJWISA.js → chunk-UTXPKA2C.js} +6 -6
  20. package/dist/{chunk-CHRYSMMG.js → chunk-VL5WAV6F.js} +3 -3
  21. package/dist/{chunk-4N2GPPW5.js → chunk-WL7QOS6J.js} +3 -3
  22. package/dist/{chunk-7XGJ2DPJ.js → chunk-ZCWTYMYZ.js} +3 -3
  23. package/dist/{chunk-FAJ3NJRT.js → chunk-ZLXTKRU5.js} +3 -3
  24. package/dist/{chunk-5M7JSMKP.js → chunk-ZMBAL5QJ.js} +3 -3
  25. package/dist/{cli-truncate-R7BZHTWM.js → cli-truncate-7VBORESD.js} +5 -5
  26. package/dist/commands/dev-parent.js +2 -2
  27. package/dist/{dd-trace-TMWNM5TU.js → dd-trace-5BYOFB5K.js} +7 -7
  28. package/dist/{dist-QGBH4SEF.js → dist-QIUPLZAF.js} +13 -13
  29. package/dist/{embedded-playwright-mcp-server-6GY37WOF.js → embedded-playwright-mcp-server-WWPWW4DO.js} +3 -3
  30. package/dist/{enquirer-QSA4Q3KI.js → enquirer-APO5ZWFR.js} +4 -4
  31. package/dist/{estree-M5XOW65K.js → estree-AMTSACNT.js} +3 -3
  32. package/dist/{flow-L3D4WX3Z.js → flow-AEXGDJ6G.js} +3 -3
  33. package/dist/{getMachineId-bsd-I2VASQDS.js → getMachineId-bsd-JKUN5SSP.js} +5 -5
  34. package/dist/{getMachineId-darwin-VTQRCEUS.js → getMachineId-darwin-HAXIZ4SF.js} +5 -5
  35. package/dist/{getMachineId-linux-4IXPONMU.js → getMachineId-linux-QJ34RVXE.js} +4 -4
  36. package/dist/{getMachineId-unsupported-UAR7YCNX.js → getMachineId-unsupported-RNQUGZ5J.js} +4 -4
  37. package/dist/{getMachineId-win-C7XX6XLO.js → getMachineId-win-VVNK5ZBD.js} +5 -5
  38. package/dist/{glimmer-LUDC5QNV.js → glimmer-RDX5SMUW.js} +3 -3
  39. package/dist/{graphql-VIZ3REIC.js → graphql-BZRHZUYU.js} +3 -3
  40. package/dist/{html-I6EAKISS.js → html-BYTKDYRN.js} +3 -3
  41. package/dist/{http-XXFRZJNU.js → http-WAR6VDDW.js} +12 -12
  42. package/dist/index.js +307 -26
  43. package/dist/index.js.map +1 -1
  44. package/dist/{jiti-EJ36EOMK.js → jiti-X73LQAEX.js} +3 -3
  45. package/dist/{log-update-53HBE7QZ.js → log-update-NHJG4C4W.js} +6 -6
  46. package/dist/{markdown-STBGDZM6.js → markdown-EMBWCYGU.js} +3 -3
  47. package/dist/{meriyah-65T7PG5O.js → meriyah-JGF6IOPU.js} +3 -3
  48. package/dist/{postcss-ASIVSSN2.js → postcss-AWH3AW63.js} +3 -3
  49. package/dist/{read-pkg-MWZA3RU5.js → read-pkg-N6NFQVTC.js} +5 -5
  50. package/dist/{spans-3EJDY2PZ.js → spans-OCSVIZ33.js} +4 -4
  51. package/dist/{src-DWCFAABS.js → src-67P7IHOU.js} +3 -3
  52. package/dist/{token-YF6QEPIT.js → token-HO5IGIIO.js} +5 -5
  53. package/dist/{token-util-TV464TI4.js → token-util-SLK3VTG6.js} +5 -5
  54. package/dist/{typescript-ZZIEC5OF.js → typescript-6MCB7LTV.js} +3 -3
  55. package/dist/{wrap-ansi-7RMGVNIF.js → wrap-ansi-L4S3BRNZ.js} +5 -5
  56. package/dist/{yaml-P2AMYUL3.js → yaml-WJS33RAV.js} +3 -3
  57. package/oclif.manifest.json +8 -1
  58. package/package.json +5 -5
  59. /package/dist/{acorn-QRHEJZ4Y.js.map → acorn-SLEBXOPM.js.map} +0 -0
  60. /package/dist/{angular-E7FCGLEO.js.map → angular-6RC4UUQO.js.map} +0 -0
  61. /package/dist/{api-F7VFMVH5.js.map → api-SNLSSH3U.js.map} +0 -0
  62. /package/dist/{babel-XU2VNNSQ.js.map → babel-ASTIWI3P.js.map} +0 -0
  63. /package/dist/{chunk-X2O46BBJ.js.map → chunk-2X5VDGUL.js.map} +0 -0
  64. /package/dist/{chunk-VUXGBCHS.js.map → chunk-5QM3EEXH.js.map} +0 -0
  65. /package/dist/{chunk-42MJC4KH.js.map → chunk-634XQVTI.js.map} +0 -0
  66. /package/dist/{chunk-H427LM2L.js.map → chunk-6XMCVOST.js.map} +0 -0
  67. /package/dist/{chunk-Y5UCK4QB.js.map → chunk-AYW7EDEX.js.map} +0 -0
  68. /package/dist/{chunk-Z64OZ4VQ.js.map → chunk-E4SP3S63.js.map} +0 -0
  69. /package/dist/{chunk-UQQWHXCE.js.map → chunk-E7KUQ4FE.js.map} +0 -0
  70. /package/dist/{chunk-QQTIZ3JW.js.map → chunk-HY7UBGMX.js.map} +0 -0
  71. /package/dist/{chunk-E33HPBUC.js.map → chunk-MNJJSKHZ.js.map} +0 -0
  72. /package/dist/{chunk-SOVZ4MKE.js.map → chunk-SKMNWLPY.js.map} +0 -0
  73. /package/dist/{chunk-JUTJWISA.js.map → chunk-UTXPKA2C.js.map} +0 -0
  74. /package/dist/{chunk-CHRYSMMG.js.map → chunk-VL5WAV6F.js.map} +0 -0
  75. /package/dist/{chunk-4N2GPPW5.js.map → chunk-WL7QOS6J.js.map} +0 -0
  76. /package/dist/{chunk-7XGJ2DPJ.js.map → chunk-ZCWTYMYZ.js.map} +0 -0
  77. /package/dist/{chunk-FAJ3NJRT.js.map → chunk-ZLXTKRU5.js.map} +0 -0
  78. /package/dist/{chunk-5M7JSMKP.js.map → chunk-ZMBAL5QJ.js.map} +0 -0
  79. /package/dist/{cli-truncate-R7BZHTWM.js.map → cli-truncate-7VBORESD.js.map} +0 -0
  80. /package/dist/{dd-trace-TMWNM5TU.js.map → dd-trace-5BYOFB5K.js.map} +0 -0
  81. /package/dist/{dist-QGBH4SEF.js.map → dist-QIUPLZAF.js.map} +0 -0
  82. /package/dist/{embedded-playwright-mcp-server-6GY37WOF.js.map → embedded-playwright-mcp-server-WWPWW4DO.js.map} +0 -0
  83. /package/dist/{enquirer-QSA4Q3KI.js.map → enquirer-APO5ZWFR.js.map} +0 -0
  84. /package/dist/{estree-M5XOW65K.js.map → estree-AMTSACNT.js.map} +0 -0
  85. /package/dist/{flow-L3D4WX3Z.js.map → flow-AEXGDJ6G.js.map} +0 -0
  86. /package/dist/{getMachineId-bsd-I2VASQDS.js.map → getMachineId-bsd-JKUN5SSP.js.map} +0 -0
  87. /package/dist/{getMachineId-darwin-VTQRCEUS.js.map → getMachineId-darwin-HAXIZ4SF.js.map} +0 -0
  88. /package/dist/{getMachineId-linux-4IXPONMU.js.map → getMachineId-linux-QJ34RVXE.js.map} +0 -0
  89. /package/dist/{getMachineId-unsupported-UAR7YCNX.js.map → getMachineId-unsupported-RNQUGZ5J.js.map} +0 -0
  90. /package/dist/{getMachineId-win-C7XX6XLO.js.map → getMachineId-win-VVNK5ZBD.js.map} +0 -0
  91. /package/dist/{glimmer-LUDC5QNV.js.map → glimmer-RDX5SMUW.js.map} +0 -0
  92. /package/dist/{graphql-VIZ3REIC.js.map → graphql-BZRHZUYU.js.map} +0 -0
  93. /package/dist/{html-I6EAKISS.js.map → html-BYTKDYRN.js.map} +0 -0
  94. /package/dist/{http-XXFRZJNU.js.map → http-WAR6VDDW.js.map} +0 -0
  95. /package/dist/{jiti-EJ36EOMK.js.map → jiti-X73LQAEX.js.map} +0 -0
  96. /package/dist/{log-update-53HBE7QZ.js.map → log-update-NHJG4C4W.js.map} +0 -0
  97. /package/dist/{markdown-STBGDZM6.js.map → markdown-EMBWCYGU.js.map} +0 -0
  98. /package/dist/{meriyah-65T7PG5O.js.map → meriyah-JGF6IOPU.js.map} +0 -0
  99. /package/dist/{postcss-ASIVSSN2.js.map → postcss-AWH3AW63.js.map} +0 -0
  100. /package/dist/{read-pkg-MWZA3RU5.js.map → read-pkg-N6NFQVTC.js.map} +0 -0
  101. /package/dist/{spans-3EJDY2PZ.js.map → spans-OCSVIZ33.js.map} +0 -0
  102. /package/dist/{src-DWCFAABS.js.map → src-67P7IHOU.js.map} +0 -0
  103. /package/dist/{token-YF6QEPIT.js.map → token-HO5IGIIO.js.map} +0 -0
  104. /package/dist/{token-util-TV464TI4.js.map → token-util-SLK3VTG6.js.map} +0 -0
  105. /package/dist/{typescript-ZZIEC5OF.js.map → typescript-6MCB7LTV.js.map} +0 -0
  106. /package/dist/{wrap-ansi-7RMGVNIF.js.map → wrap-ansi-L4S3BRNZ.js.map} +0 -0
  107. /package/dist/{yaml-P2AMYUL3.js.map → yaml-WJS33RAV.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd6e752a2cecf8e93bafaf04dda2d5214949ae79a';
4
+ process.env.DD_GIT_COMMIT_SHA = '8c829e0a3a1ea9ec89ca751d0ae49a4b1db165e2';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -12,7 +12,7 @@ globalThis.__dirname ??= $dd_dirname(globalThis.__filename);
12
12
 
13
13
  import {
14
14
  init_cjs_shims
15
- } from "./chunk-E33HPBUC.js";
15
+ } from "./chunk-MNJJSKHZ.js";
16
16
 
17
17
  // ../../../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/graphql.mjs
18
18
  init_cjs_shims();
@@ -1279,4 +1279,4 @@ export {
1279
1279
  he as parsers,
1280
1280
  nn as printers
1281
1281
  };
1282
- //# sourceMappingURL=graphql-VIZ3REIC.js.map
1282
+ //# sourceMappingURL=graphql-BZRHZUYU.js.map
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd6e752a2cecf8e93bafaf04dda2d5214949ae79a';
4
+ process.env.DD_GIT_COMMIT_SHA = '8c829e0a3a1ea9ec89ca751d0ae49a4b1db165e2';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -12,7 +12,7 @@ globalThis.__dirname ??= $dd_dirname(globalThis.__filename);
12
12
 
13
13
  import {
14
14
  init_cjs_shims
15
- } from "./chunk-E33HPBUC.js";
15
+ } from "./chunk-MNJJSKHZ.js";
16
16
 
17
17
  // ../../../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/html.mjs
18
18
  init_cjs_shims();
@@ -2946,4 +2946,4 @@ export {
2946
2946
  Qr as parsers,
2947
2947
  Ll as printers
2948
2948
  };
2949
- //# sourceMappingURL=html-I6EAKISS.js.map
2949
+ //# sourceMappingURL=html-BYTKDYRN.js.map
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd6e752a2cecf8e93bafaf04dda2d5214949ae79a';
4
+ process.env.DD_GIT_COMMIT_SHA = '8c829e0a3a1ea9ec89ca751d0ae49a4b1db165e2';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -19,18 +19,18 @@ import {
19
19
  package_default,
20
20
  resolveProfile,
21
21
  toolDefinitions
22
- } from "./chunk-JUTJWISA.js";
23
- import "./chunk-XBQXSTNW.js";
24
- import "./chunk-QQTIZ3JW.js";
25
- import "./chunk-7XGJ2DPJ.js";
26
- import "./chunk-X2O46BBJ.js";
27
- import "./chunk-H427LM2L.js";
28
- import "./chunk-Y5UCK4QB.js";
29
- import "./chunk-4N2GPPW5.js";
30
- import "./chunk-FAJ3NJRT.js";
22
+ } from "./chunk-UTXPKA2C.js";
23
+ import "./chunk-HOSXK2Y6.js";
24
+ import "./chunk-HY7UBGMX.js";
25
+ import "./chunk-ZCWTYMYZ.js";
26
+ import "./chunk-2X5VDGUL.js";
27
+ import "./chunk-6XMCVOST.js";
28
+ import "./chunk-AYW7EDEX.js";
29
+ import "./chunk-WL7QOS6J.js";
30
+ import "./chunk-ZLXTKRU5.js";
31
31
  import {
32
32
  init_cjs_shims
33
- } from "./chunk-E33HPBUC.js";
33
+ } from "./chunk-MNJJSKHZ.js";
34
34
 
35
35
  // ../mcp-server/dist/http.js
36
36
  init_cjs_shims();
@@ -313,4 +313,4 @@ async function startHttpServer(options = {}) {
313
313
  export {
314
314
  startHttpServer
315
315
  };
316
- //# sourceMappingURL=http-XXFRZJNU.js.map
316
+ //# sourceMappingURL=http-WAR6VDDW.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  if (typeof process === 'object' && process !== null &&
2
2
  process.env !== null && typeof process.env === 'object') {
3
3
  process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
4
- process.env.DD_GIT_COMMIT_SHA = 'd6e752a2cecf8e93bafaf04dda2d5214949ae79a';
4
+ process.env.DD_GIT_COMMIT_SHA = '8c829e0a3a1ea9ec89ca751d0ae49a4b1db165e2';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -15,7 +15,7 @@ import {
15
15
  configPathForClient,
16
16
  labelForClient,
17
17
  mergeMcpConfig
18
- } from "./chunk-VUXGBCHS.js";
18
+ } from "./chunk-5QM3EEXH.js";
19
19
  import {
20
20
  AUTO_UPGRADE_EXIT_CODE,
21
21
  AuthHotReloadServer,
@@ -62,6 +62,7 @@ import {
62
62
  isSocketAlive,
63
63
  magenta,
64
64
  modeFlagValuesMap,
65
+ preWarmViteCache,
65
66
  readApiFromDisk,
66
67
  readApplicationFromDisk,
67
68
  readMultiPageApplicationFromDisk,
@@ -78,28 +79,28 @@ import {
78
79
  writeApplicationToDisk,
79
80
  writeResourceToDisk,
80
81
  yellow
81
- } from "./chunk-XBQXSTNW.js";
82
- import "./chunk-QQTIZ3JW.js";
82
+ } from "./chunk-HOSXK2Y6.js";
83
+ import "./chunk-HY7UBGMX.js";
83
84
  import {
84
85
  require_enquirer
85
- } from "./chunk-SOVZ4MKE.js";
86
+ } from "./chunk-SKMNWLPY.js";
86
87
  import {
87
88
  init_lodash,
88
89
  isEmpty_default,
89
90
  require_lib
90
- } from "./chunk-7XGJ2DPJ.js";
91
+ } from "./chunk-ZCWTYMYZ.js";
91
92
  import {
92
93
  require_rfdc
93
- } from "./chunk-X2O46BBJ.js";
94
- import "./chunk-H427LM2L.js";
95
- import "./chunk-Y5UCK4QB.js";
96
- import "./chunk-4N2GPPW5.js";
97
- import "./chunk-FAJ3NJRT.js";
94
+ } from "./chunk-2X5VDGUL.js";
95
+ import "./chunk-6XMCVOST.js";
96
+ import "./chunk-AYW7EDEX.js";
97
+ import "./chunk-WL7QOS6J.js";
98
+ import "./chunk-ZLXTKRU5.js";
98
99
  import {
99
100
  __commonJS,
100
101
  __toESM,
101
102
  init_cjs_shims
102
- } from "./chunk-E33HPBUC.js";
103
+ } from "./chunk-MNJJSKHZ.js";
103
104
 
104
105
  // ../../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
105
106
  var require_eventemitter3 = __commonJS({
@@ -1011,7 +1012,7 @@ async function createPrompt(options, settings) {
1011
1012
  enquirer3 = settings.enquirer;
1012
1013
  } else {
1013
1014
  try {
1014
- enquirer3 = await import("./enquirer-QSA4Q3KI.js").then((imported) => imported.default ? new imported.default() : new imported());
1015
+ enquirer3 = await import("./enquirer-APO5ZWFR.js").then((imported) => imported.default ? new imported.default() : new imported());
1015
1016
  } catch (e) {
1016
1017
  if (this instanceof TaskWrapper) {
1017
1018
  this.task.prompt = new PromptError("Enquirer is a peer dependency that must be installed separately.");
@@ -1219,9 +1220,9 @@ var _DefaultRenderer = class {
1219
1220
  return typeof bottomBar === "number" && bottomBar !== 0 || typeof bottomBar === "boolean" && bottomBar !== false || !task.hasTitle();
1220
1221
  }
1221
1222
  async render() {
1222
- const { createLogUpdate } = await import("./log-update-53HBE7QZ.js");
1223
- const { default: truncate } = await import("./cli-truncate-R7BZHTWM.js");
1224
- const { default: wrap } = await import("./wrap-ansi-7RMGVNIF.js");
1223
+ const { createLogUpdate } = await import("./log-update-NHJG4C4W.js");
1224
+ const { default: truncate } = await import("./cli-truncate-7VBORESD.js");
1225
+ const { default: wrap } = await import("./wrap-ansi-L4S3BRNZ.js");
1225
1226
  this.updater = createLogUpdate(this.logger.process.stdout);
1226
1227
  this.truncate = truncate;
1227
1228
  this.wrap = wrap;
@@ -4786,7 +4787,9 @@ var Deploy = class _Deploy extends AuthenticatedCommand {
4786
4787
  // src/commands/dev.mts
4787
4788
  init_cjs_shims();
4788
4789
  import * as child_process from "node:child_process";
4789
- import { resolve } from "node:path";
4790
+ import * as fs6 from "node:fs";
4791
+ import * as http from "node:http";
4792
+ import { basename, dirname, join as join3, resolve } from "node:path";
4790
4793
  import { Flags as Flags6, ux as ux4 } from "@oclif/core";
4791
4794
  var import_util13 = __toESM(require_dist2(), 1);
4792
4795
  var Dev = class _Dev extends AuthenticatedCommand {
@@ -4795,6 +4798,12 @@ var Dev = class _Dev extends AuthenticatedCommand {
4795
4798
  flags;
4796
4799
  applicationConfig;
4797
4800
  superblocksBaseUrl;
4801
+ warmServer;
4802
+ // When true, the CLI was started in warm pool standby mode and subsequently
4803
+ // activated by SABS. Used to route auto-upgrade to SKIP_CLI_ONLY — the warm
4804
+ // pod already ships with the latest CLI, but the user's package.json still
4805
+ // needs to be synced to the target @superblocksteam/library version.
4806
+ warmStandbyActivated = false;
4798
4807
  authHotReloadServer;
4799
4808
  getAuthTokenTimeoutMs() {
4800
4809
  return 5 * 60 * 1e3;
@@ -4809,6 +4818,9 @@ var Dev = class _Dev extends AuthenticatedCommand {
4809
4818
  async init() {
4810
4819
  const { flags } = await this.parse(_Dev);
4811
4820
  this.flags = flags;
4821
+ if (this.flags.warm) {
4822
+ return;
4823
+ }
4812
4824
  let token;
4813
4825
  let superblocksBaseUrl;
4814
4826
  const branch = await getCurrentBranchInfo();
@@ -4979,7 +4991,7 @@ var Dev = class _Dev extends AuthenticatedCommand {
4979
4991
  if (!this.flags) {
4980
4992
  throw new Error("Flags are not initialized");
4981
4993
  }
4982
- const autoUpgradeMode = this.flags["skip-auto-upgrade"] ? DevServerAutoUpgradeMode.SKIP : this.flags["force-auto-upgrade"] ? DevServerAutoUpgradeMode.FORCE : void 0;
4994
+ const autoUpgradeMode = this.warmStandbyActivated ? DevServerAutoUpgradeMode.SKIP_CLI_ONLY : this.flags["skip-auto-upgrade"] ? DevServerAutoUpgradeMode.SKIP : this.flags["force-auto-upgrade"] ? DevServerAutoUpgradeMode.FORCE : void 0;
4983
4995
  await this.startDevServer({
4984
4996
  applicationConfig: this.applicationConfig,
4985
4997
  tokenConfig: {
@@ -4994,7 +5006,9 @@ var Dev = class _Dev extends AuthenticatedCommand {
4994
5006
  superblocksPath: resolve(process.argv[1]),
4995
5007
  autoUpgradeMode,
4996
5008
  sdk,
4997
- prefetchedApplication
5009
+ prefetchedApplication,
5010
+ skipSync: false
5011
+ // DBFS runs alongside S3 during migration (D-25)
4998
5012
  });
4999
5013
  }
5000
5014
  async onTokenReceived(token) {
@@ -5025,6 +5039,12 @@ var Dev = class _Dev extends AuthenticatedCommand {
5025
5039
  description: "The port that the dev server will run on",
5026
5040
  hidden: true
5027
5041
  }),
5042
+ warm: Flags6.boolean({
5043
+ name: "warm",
5044
+ description: "Start in warm standby mode: pre-loads the server process without auth, then activates on /_sb_activate POST",
5045
+ default: false,
5046
+ hidden: true
5047
+ }),
5028
5048
  "upload-first": Flags6.boolean({
5029
5049
  name: "upload-first",
5030
5050
  description: "Upload to Superblocks before starting",
@@ -5073,6 +5093,10 @@ var Dev = class _Dev extends AuthenticatedCommand {
5073
5093
  if (!this.flags) {
5074
5094
  throw new Error("Flags are not initialized");
5075
5095
  }
5096
+ if (this.flags.warm) {
5097
+ await this.runWarmStandby();
5098
+ return;
5099
+ }
5076
5100
  if (!this.flags["upload-first"] && !this.flags["download-first"]) {
5077
5101
  throw new Error(
5078
5102
  "This command requires either the --upload-first or --download-first flag"
@@ -5158,8 +5182,265 @@ var Dev = class _Dev extends AuthenticatedCommand {
5158
5182
  tokenManager: this.tokenManager,
5159
5183
  getCurrentToken: () => this.getCurrentToken(),
5160
5184
  authHotReloadServer: this.authHotReloadServer,
5161
- autoUpgradeMode: options.autoUpgradeMode
5185
+ autoUpgradeMode: options.autoUpgradeMode,
5186
+ existingServer: this.warmServer
5187
+ });
5188
+ }
5189
+ /**
5190
+ * Warm standby mode: starts a minimal HTTP server that responds to health
5191
+ * checks while the Node.js runtime is fully loaded in memory. When SABS
5192
+ * activates the pod via POST /_sb_activate with session credentials, this
5193
+ * method writes the config files, closes the standby server, and hands off
5194
+ * to the normal `executeWithToken` flow.
5195
+ *
5196
+ * This eliminates the ~1.9s CLI cold-start from the claim-time critical path.
5197
+ */
5198
+ async runWarmStandby() {
5199
+ const port = this.flags?.port ?? 5173;
5200
+ const logger = this.logger();
5201
+ logger.info(`Starting warm standby server on port ${port}`);
5202
+ const activationConfig = await new Promise((resolveActivation, rejectActivation) => {
5203
+ let preWarmReady = false;
5204
+ const server = http.createServer((req, res) => {
5205
+ res.setHeader("Cache-Control", "no-store, max-age=0");
5206
+ res.setHeader("x-csb-no-sw-proxy", "1");
5207
+ if (req.url === "/_sb_ready" && req.method === "GET") {
5208
+ const status = preWarmReady ? 200 : 503;
5209
+ res.writeHead(status, { "Content-Type": "application/json" });
5210
+ res.end(
5211
+ JSON.stringify({ status: preWarmReady ? "ready" : "warming" })
5212
+ );
5213
+ return;
5214
+ }
5215
+ if (req.url === "/_sb_health" && req.method === "GET") {
5216
+ res.writeHead(503, { "Content-Type": "application/json" });
5217
+ res.end(JSON.stringify({ status: "warming" }));
5218
+ return;
5219
+ }
5220
+ if (req.url === "/_sb_activate" && req.method === "POST") {
5221
+ const MAX_BODY = 64 * 1024;
5222
+ let body = "";
5223
+ let destroyed = false;
5224
+ req.on("data", (chunk) => {
5225
+ if (destroyed) return;
5226
+ body += chunk.toString();
5227
+ if (body.length > MAX_BODY) {
5228
+ destroyed = true;
5229
+ res.writeHead(413, { "Content-Type": "application/json" });
5230
+ res.end(JSON.stringify({ error: "Request body too large" }));
5231
+ req.destroy();
5232
+ }
5233
+ });
5234
+ req.on("end", () => {
5235
+ if (destroyed) return;
5236
+ try {
5237
+ const config = JSON.parse(body);
5238
+ const missing = ["token", "baseUrl", "applicationId", "branch"].filter((k) => typeof config[k] !== "string" || !config[k]);
5239
+ if (missing.length) {
5240
+ res.writeHead(400, { "Content-Type": "application/json" });
5241
+ res.end(
5242
+ JSON.stringify({
5243
+ error: `Missing required fields: ${missing.join(", ")}`
5244
+ })
5245
+ );
5246
+ return;
5247
+ }
5248
+ res.writeHead(200, { "Content-Type": "application/json" });
5249
+ res.end(JSON.stringify({ status: "activating" }));
5250
+ logger.info(
5251
+ "Activation received, transitioning to full dev server"
5252
+ );
5253
+ this.warmServer = server;
5254
+ resolveActivation(config);
5255
+ } catch {
5256
+ res.writeHead(400, { "Content-Type": "application/json" });
5257
+ res.end(JSON.stringify({ error: "invalid JSON body" }));
5258
+ }
5259
+ });
5260
+ return;
5261
+ }
5262
+ res.writeHead(503);
5263
+ res.end();
5264
+ });
5265
+ server.on("error", (err) => {
5266
+ logger.error(`Warm standby server failed to start: ${err.message}`);
5267
+ rejectActivation(err);
5268
+ });
5269
+ server.listen(port, () => {
5270
+ logger.info(`Warm standby ready on port ${port}`);
5271
+ preWarmViteCache(process.cwd()).then(() => {
5272
+ preWarmReady = true;
5273
+ });
5274
+ });
5162
5275
  });
5276
+ process.env.SUPERBLOCKS_TOKEN = activationConfig.token;
5277
+ process.env.SUPERBLOCKS_BASE_URL = activationConfig.baseUrl;
5278
+ process.env.APPLICATION_ID = activationConfig.applicationId;
5279
+ process.env.BRANCH = activationConfig.branch;
5280
+ if (activationConfig.hostname) {
5281
+ process.env.SABS_LIVE_EDIT_HOSTNAME = activationConfig.hostname;
5282
+ }
5283
+ if (activationConfig.templateName) {
5284
+ process.env.SUPERBLOCKS_APP_TEMPLATE_NAME = activationConfig.templateName;
5285
+ const currentDir = basename(process.cwd());
5286
+ if (currentDir !== activationConfig.templateName) {
5287
+ const targetDir = join3(
5288
+ process.cwd(),
5289
+ "..",
5290
+ activationConfig.templateName
5291
+ );
5292
+ if (fs6.existsSync(targetDir)) {
5293
+ logger.info(
5294
+ `Switching template directory: ${currentDir} -> ${activationConfig.templateName}`
5295
+ );
5296
+ process.chdir(targetDir);
5297
+ } else {
5298
+ logger.warn(
5299
+ `Template directory not found: ${targetDir}, staying in ${currentDir}`
5300
+ );
5301
+ }
5302
+ }
5303
+ }
5304
+ const authFilePath = (0, import_util13.resolveAuthFilePath)();
5305
+ fs6.mkdirSync(dirname(authFilePath), { recursive: true });
5306
+ fs6.writeFileSync(
5307
+ authFilePath,
5308
+ JSON.stringify({
5309
+ superblocksBaseUrl: activationConfig.baseUrl,
5310
+ token: activationConfig.token
5311
+ })
5312
+ );
5313
+ const appConfigPath = join3(
5314
+ process.cwd(),
5315
+ ".superblocks",
5316
+ "superblocks.json"
5317
+ );
5318
+ fs6.mkdirSync(dirname(appConfigPath), { recursive: true });
5319
+ fs6.writeFileSync(
5320
+ appConfigPath,
5321
+ JSON.stringify({
5322
+ configType: "APPLICATION_V2",
5323
+ id: activationConfig.applicationId
5324
+ })
5325
+ );
5326
+ const devEnvPath = join3(
5327
+ process.cwd(),
5328
+ "..",
5329
+ "..",
5330
+ ".superblocks",
5331
+ "dev-environment.json"
5332
+ );
5333
+ fs6.mkdirSync(dirname(devEnvPath), { recursive: true });
5334
+ fs6.writeFileSync(
5335
+ devEnvPath,
5336
+ JSON.stringify({
5337
+ configType: "DEV_ENVIRONMENT",
5338
+ branch: activationConfig.branch
5339
+ })
5340
+ );
5341
+ if (activationConfig.downloadURL) {
5342
+ try {
5343
+ logger.info("Downloading workspace archive...");
5344
+ const downloadStart = Date.now();
5345
+ const downloadResp = await fetch(activationConfig.downloadURL, {
5346
+ signal: AbortSignal.timeout(3e4)
5347
+ });
5348
+ if (!downloadResp.ok || !downloadResp.body) {
5349
+ throw new Error(
5350
+ `Workspace download failed: ${downloadResp.status} ${downloadResp.statusText}`
5351
+ );
5352
+ }
5353
+ logger.info(
5354
+ `Workspace download completed in ${Date.now() - downloadStart}ms, extracting...`
5355
+ );
5356
+ const extractStart = Date.now();
5357
+ await new Promise((resolveExtract, rejectExtract) => {
5358
+ const zstdProc = child_process.spawn("zstd", ["-d"], {
5359
+ stdio: ["pipe", "pipe", "pipe"]
5360
+ });
5361
+ const tarProc = child_process.spawn(
5362
+ "tar",
5363
+ ["xf", "-", "-C", process.cwd()],
5364
+ {
5365
+ stdio: ["pipe", "inherit", "pipe"]
5366
+ }
5367
+ );
5368
+ zstdProc.stdout.pipe(tarProc.stdin);
5369
+ zstdProc.stdin.on("error", (err) => {
5370
+ rejectExtract(new Error(`zstd stdin stream error: ${err.message}`));
5371
+ });
5372
+ tarProc.stdin.on("error", (err) => {
5373
+ rejectExtract(new Error(`tar stdin stream error: ${err.message}`));
5374
+ });
5375
+ const reader = downloadResp.body.getReader();
5376
+ const pump = async () => {
5377
+ while (true) {
5378
+ const { done, value } = await reader.read();
5379
+ if (done) {
5380
+ zstdProc.stdin.end();
5381
+ break;
5382
+ }
5383
+ if (!zstdProc.stdin.write(value)) {
5384
+ await new Promise((r) => zstdProc.stdin.once("drain", r));
5385
+ }
5386
+ }
5387
+ };
5388
+ pump().catch((e) => {
5389
+ zstdProc.kill();
5390
+ tarProc.kill();
5391
+ rejectExtract(e);
5392
+ });
5393
+ let stderr = "";
5394
+ zstdProc.stderr.on("data", (chunk) => {
5395
+ stderr += chunk.toString();
5396
+ });
5397
+ tarProc.stderr?.on("data", (chunk) => {
5398
+ stderr += chunk.toString();
5399
+ });
5400
+ let zstdExitCode = null;
5401
+ zstdProc.on("close", (code) => {
5402
+ zstdExitCode = code;
5403
+ });
5404
+ tarProc.on("close", (code) => {
5405
+ if (zstdExitCode !== null && zstdExitCode !== 0) {
5406
+ rejectExtract(
5407
+ new Error(
5408
+ `zstd decompression failed (code ${zstdExitCode}): ${stderr}`
5409
+ )
5410
+ );
5411
+ } else if (code === 0) {
5412
+ resolveExtract();
5413
+ } else {
5414
+ rejectExtract(
5415
+ new Error(`tar extract failed (code ${code}): ${stderr}`)
5416
+ );
5417
+ }
5418
+ });
5419
+ tarProc.on("error", rejectExtract);
5420
+ zstdProc.on("error", rejectExtract);
5421
+ });
5422
+ logger.info(
5423
+ `Workspace extracted in ${Date.now() - extractStart}ms (total ${Date.now() - downloadStart}ms)`
5424
+ );
5425
+ } catch (error) {
5426
+ logger.warn(
5427
+ `Workspace download/extract failed, DBFS will fill the gap: ${error}`
5428
+ );
5429
+ }
5430
+ }
5431
+ this.currentToken = activationConfig.token;
5432
+ this.superblocksBaseUrl = activationConfig.baseUrl;
5433
+ this.applicationConfig = {
5434
+ id: activationConfig.applicationId,
5435
+ branchName: activationConfig.branch
5436
+ };
5437
+ this.warmStandbyActivated = true;
5438
+ this.flags = {
5439
+ ...this.flags,
5440
+ "download-first": true
5441
+ };
5442
+ await this.initializeTelemetry(activationConfig.token);
5443
+ await this.executeWithToken(activationConfig.token);
5163
5444
  }
5164
5445
  async spawnAndWaitForChild(previousRunResult, flags) {
5165
5446
  let _resolve;
@@ -5978,12 +6259,12 @@ var McpServe = class _McpServe extends Command9 {
5978
6259
  "HTTP transport requires auth token. Pass --http-token <token> or set SUPERBLOCKS_MCP_HTTP_TOKEN."
5979
6260
  );
5980
6261
  }
5981
- const { startHttpServer } = await import("./http-XXFRZJNU.js");
6262
+ const { startHttpServer } = await import("./http-WAR6VDDW.js");
5982
6263
  await startHttpServer({ port: flags.port, authToken: httpToken });
5983
6264
  await new Promise(() => {
5984
6265
  });
5985
6266
  } else {
5986
- const { startServer } = await import("./dist-QGBH4SEF.js");
6267
+ const { startServer } = await import("./dist-QIUPLZAF.js");
5987
6268
  await startServer();
5988
6269
  await new Promise((resolve2) => {
5989
6270
  process.stdin.once("end", () => resolve2());
@@ -7466,7 +7747,7 @@ function getResourceIdFromLocation(ctx, resourceLocation) {
7466
7747
  // src/commands/sync.mts
7467
7748
  init_cjs_shims();
7468
7749
  import { execFile } from "node:child_process";
7469
- import * as fs11 from "node:fs/promises";
7750
+ import * as fs12 from "node:fs/promises";
7470
7751
  import * as os from "node:os";
7471
7752
  import path17 from "node:path";
7472
7753
  import { promisify as promisify2 } from "node:util";
@@ -7560,7 +7841,7 @@ var Sync = class _Sync extends Command11 {
7560
7841
  appRelativePath,
7561
7842
  requestedSha
7562
7843
  }) {
7563
- const worktreeBase = await fs11.mkdtemp(
7844
+ const worktreeBase = await fs12.mkdtemp(
7564
7845
  path17.join(os.tmpdir(), "superblocks-sync-main-")
7565
7846
  );
7566
7847
  const worktreePath = path17.join(worktreeBase, "worktree");
@@ -7620,7 +7901,7 @@ var Sync = class _Sync extends Command11 {
7620
7901
  );
7621
7902
  } catch {
7622
7903
  }
7623
- await fs11.rm(worktreeBase, { recursive: true, force: true });
7904
+ await fs12.rm(worktreeBase, { recursive: true, force: true });
7624
7905
  }
7625
7906
  }
7626
7907
  async resolveRepoRoot(localDirectoryPath) {
@@ -7657,7 +7938,7 @@ var Sync = class _Sync extends Command11 {
7657
7938
  return snapshotAppPath;
7658
7939
  }
7659
7940
  const uploadPath = path17.join(worktreeBase, "upload");
7660
- await fs11.cp(snapshotAppPath, uploadPath, {
7941
+ await fs12.cp(snapshotAppPath, uploadPath, {
7661
7942
  recursive: true,
7662
7943
  force: true,
7663
7944
  filter: (sourcePath) => path17.basename(sourcePath) !== ".git"