@superblocksteam/cli 2.0.142 → 2.0.143-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/dist/{acorn-KXCBAFWI.js → acorn-AJDVE4QH.js} +3 -3
  3. package/dist/{angular-W2CRMTFW.js → angular-HCD74UUN.js} +3 -3
  4. package/dist/{api-LARDW5IF.js → api-F6S327BR.js} +4 -4
  5. package/dist/{babel-ET2JKKKV.js → babel-DGXGAC2V.js} +3 -3
  6. package/dist/{chunk-CCXVP7XW.js → chunk-27IUQSAX.js} +3 -3
  7. package/dist/{chunk-MRLWUODZ.js → chunk-5OQ7NQV4.js} +3 -3
  8. package/dist/{chunk-LZSD23I6.js → chunk-6QQV5LEQ.js} +3 -3
  9. package/dist/{chunk-D2KH4LW3.js → chunk-BN5TUF3Y.js} +4 -4
  10. package/dist/{chunk-JIIJQ7WB.js → chunk-C5XVC53E.js} +4 -4
  11. package/dist/{chunk-JMQ7QZLC.js → chunk-D5PQDEI6.js} +4 -4
  12. package/dist/{chunk-DMJEQIZY.js → chunk-E2MD5ZBH.js} +3 -3
  13. package/dist/{chunk-TXEAU5S6.js → chunk-E62O3CYH.js} +6 -6
  14. package/dist/{chunk-KETJT4EP.js → chunk-FFCGZHEL.js} +3 -3
  15. package/dist/{chunk-TCOFIPP4.js → chunk-IJCLINS2.js} +4 -4
  16. package/dist/{chunk-5UMGBSBC.js → chunk-IYOAZDIG.js} +3 -3
  17. package/dist/{chunk-VTOGLK6A.js → chunk-JXYTQSRN.js} +3 -3
  18. package/dist/{chunk-U6IRPEPT.js → chunk-NNL3Y6H7.js} +158 -89
  19. package/dist/{chunk-U6IRPEPT.js.map → chunk-NNL3Y6H7.js.map} +1 -1
  20. package/dist/{chunk-4BQDYYXS.js → chunk-O2WVCRNM.js} +2 -2
  21. package/dist/{chunk-Z7XJV4QY.js → chunk-OPAOGRYR.js} +6 -6
  22. package/dist/{chunk-D62VVYP7.js → chunk-TN3QNAXI.js} +3 -3
  23. package/dist/{chunk-5NOZF5M4.js → chunk-USIYW3A4.js} +3 -3
  24. package/dist/{chunk-37IH2XAC.js → chunk-VD5WKZGA.js} +3 -3
  25. package/dist/{cli-truncate-3F3O74VF.js → cli-truncate-EY6G5XVS.js} +5 -5
  26. package/dist/commands/dev-parent.js +3 -3
  27. package/dist/{dd-trace-DIXLYL3I.js → dd-trace-X6BCDZFK.js} +7 -7
  28. package/dist/{dist-UTQHNH2H.js → dist-WEUKLRMB.js} +14 -14
  29. package/dist/{embedded-playwright-mcp-server-AHPHYTW4.js → embedded-playwright-mcp-server-2ASGKCVK.js} +3 -3
  30. package/dist/{enquirer-TKSCB76E.js → enquirer-CHX6BFNF.js} +4 -4
  31. package/dist/{estree-BWWXK5NG.js → estree-V3HH6CSB.js} +3 -3
  32. package/dist/{flow-BABUYUAN.js → flow-LYVD3HXK.js} +3 -3
  33. package/dist/{getMachineId-bsd-H5AFMDJ7.js → getMachineId-bsd-ENXXSRHS.js} +5 -5
  34. package/dist/{getMachineId-darwin-UEKT5AQO.js → getMachineId-darwin-4D6IUTQ6.js} +5 -5
  35. package/dist/{getMachineId-linux-YKDZF5LG.js → getMachineId-linux-LIHRJEUH.js} +4 -4
  36. package/dist/{getMachineId-unsupported-N3UUYA7R.js → getMachineId-unsupported-BCZWGCE7.js} +4 -4
  37. package/dist/{getMachineId-win-ATFA4LSW.js → getMachineId-win-LHKMWQEV.js} +5 -5
  38. package/dist/{glimmer-PIGMF34I.js → glimmer-MHZASOJO.js} +3 -3
  39. package/dist/{graphql-WSH7PVPC.js → graphql-CW7EUSGS.js} +3 -3
  40. package/dist/{html-66PGBSYM.js → html-BW7OUCKU.js} +3 -3
  41. package/dist/{http-7MPCSF7B.js → http-7T7LKKFI.js} +13 -13
  42. package/dist/index.js +19 -19
  43. package/dist/{jiti-3DAAO4VQ.js → jiti-MPIN4J4M.js} +3 -3
  44. package/dist/{log-update-LM3GWAF5.js → log-update-QA5JAW4F.js} +6 -6
  45. package/dist/{markdown-GSUXGRSV.js → markdown-7N4D66SE.js} +3 -3
  46. package/dist/{meriyah-ZXTRD3KN.js → meriyah-O7NDPHVK.js} +3 -3
  47. package/dist/{postcss-IN2KOCZO.js → postcss-RVIBE46M.js} +3 -3
  48. package/dist/{read-pkg-S5NV3S65.js → read-pkg-DLPUGD3L.js} +5 -5
  49. package/dist/{spans-CKW7WTIE.js → spans-XLTRZUJX.js} +4 -4
  50. package/dist/{src-EAC6EB2M.js → src-GYWXJSR2.js} +3 -3
  51. package/dist/{token-CSICKUVA.js → token-ZSR5DA2H.js} +5 -5
  52. package/dist/{token-util-CDRNVU7M.js → token-util-GCRVCU73.js} +5 -5
  53. package/dist/{typescript-NUKVIQFE.js → typescript-FUOY72ZB.js} +3 -3
  54. package/dist/{wrap-ansi-BZ6N5ACL.js → wrap-ansi-NH7V6H4E.js} +5 -5
  55. package/dist/{yaml-BTJKYTDR.js → yaml-EMVMCXGD.js} +3 -3
  56. package/oclif.manifest.json +1 -1
  57. package/package.json +6 -6
  58. /package/dist/{acorn-KXCBAFWI.js.map → acorn-AJDVE4QH.js.map} +0 -0
  59. /package/dist/{angular-W2CRMTFW.js.map → angular-HCD74UUN.js.map} +0 -0
  60. /package/dist/{api-LARDW5IF.js.map → api-F6S327BR.js.map} +0 -0
  61. /package/dist/{babel-ET2JKKKV.js.map → babel-DGXGAC2V.js.map} +0 -0
  62. /package/dist/{chunk-CCXVP7XW.js.map → chunk-27IUQSAX.js.map} +0 -0
  63. /package/dist/{chunk-MRLWUODZ.js.map → chunk-5OQ7NQV4.js.map} +0 -0
  64. /package/dist/{chunk-LZSD23I6.js.map → chunk-6QQV5LEQ.js.map} +0 -0
  65. /package/dist/{chunk-D2KH4LW3.js.map → chunk-BN5TUF3Y.js.map} +0 -0
  66. /package/dist/{chunk-JIIJQ7WB.js.map → chunk-C5XVC53E.js.map} +0 -0
  67. /package/dist/{chunk-JMQ7QZLC.js.map → chunk-D5PQDEI6.js.map} +0 -0
  68. /package/dist/{chunk-DMJEQIZY.js.map → chunk-E2MD5ZBH.js.map} +0 -0
  69. /package/dist/{chunk-TXEAU5S6.js.map → chunk-E62O3CYH.js.map} +0 -0
  70. /package/dist/{chunk-KETJT4EP.js.map → chunk-FFCGZHEL.js.map} +0 -0
  71. /package/dist/{chunk-TCOFIPP4.js.map → chunk-IJCLINS2.js.map} +0 -0
  72. /package/dist/{chunk-5UMGBSBC.js.map → chunk-IYOAZDIG.js.map} +0 -0
  73. /package/dist/{chunk-VTOGLK6A.js.map → chunk-JXYTQSRN.js.map} +0 -0
  74. /package/dist/{chunk-4BQDYYXS.js.map → chunk-O2WVCRNM.js.map} +0 -0
  75. /package/dist/{chunk-Z7XJV4QY.js.map → chunk-OPAOGRYR.js.map} +0 -0
  76. /package/dist/{chunk-D62VVYP7.js.map → chunk-TN3QNAXI.js.map} +0 -0
  77. /package/dist/{chunk-5NOZF5M4.js.map → chunk-USIYW3A4.js.map} +0 -0
  78. /package/dist/{chunk-37IH2XAC.js.map → chunk-VD5WKZGA.js.map} +0 -0
  79. /package/dist/{cli-truncate-3F3O74VF.js.map → cli-truncate-EY6G5XVS.js.map} +0 -0
  80. /package/dist/{dd-trace-DIXLYL3I.js.map → dd-trace-X6BCDZFK.js.map} +0 -0
  81. /package/dist/{dist-UTQHNH2H.js.map → dist-WEUKLRMB.js.map} +0 -0
  82. /package/dist/{embedded-playwright-mcp-server-AHPHYTW4.js.map → embedded-playwright-mcp-server-2ASGKCVK.js.map} +0 -0
  83. /package/dist/{enquirer-TKSCB76E.js.map → enquirer-CHX6BFNF.js.map} +0 -0
  84. /package/dist/{estree-BWWXK5NG.js.map → estree-V3HH6CSB.js.map} +0 -0
  85. /package/dist/{flow-BABUYUAN.js.map → flow-LYVD3HXK.js.map} +0 -0
  86. /package/dist/{getMachineId-bsd-H5AFMDJ7.js.map → getMachineId-bsd-ENXXSRHS.js.map} +0 -0
  87. /package/dist/{getMachineId-darwin-UEKT5AQO.js.map → getMachineId-darwin-4D6IUTQ6.js.map} +0 -0
  88. /package/dist/{getMachineId-linux-YKDZF5LG.js.map → getMachineId-linux-LIHRJEUH.js.map} +0 -0
  89. /package/dist/{getMachineId-unsupported-N3UUYA7R.js.map → getMachineId-unsupported-BCZWGCE7.js.map} +0 -0
  90. /package/dist/{getMachineId-win-ATFA4LSW.js.map → getMachineId-win-LHKMWQEV.js.map} +0 -0
  91. /package/dist/{glimmer-PIGMF34I.js.map → glimmer-MHZASOJO.js.map} +0 -0
  92. /package/dist/{graphql-WSH7PVPC.js.map → graphql-CW7EUSGS.js.map} +0 -0
  93. /package/dist/{html-66PGBSYM.js.map → html-BW7OUCKU.js.map} +0 -0
  94. /package/dist/{http-7MPCSF7B.js.map → http-7T7LKKFI.js.map} +0 -0
  95. /package/dist/{jiti-3DAAO4VQ.js.map → jiti-MPIN4J4M.js.map} +0 -0
  96. /package/dist/{log-update-LM3GWAF5.js.map → log-update-QA5JAW4F.js.map} +0 -0
  97. /package/dist/{markdown-GSUXGRSV.js.map → markdown-7N4D66SE.js.map} +0 -0
  98. /package/dist/{meriyah-ZXTRD3KN.js.map → meriyah-O7NDPHVK.js.map} +0 -0
  99. /package/dist/{postcss-IN2KOCZO.js.map → postcss-RVIBE46M.js.map} +0 -0
  100. /package/dist/{read-pkg-S5NV3S65.js.map → read-pkg-DLPUGD3L.js.map} +0 -0
  101. /package/dist/{spans-CKW7WTIE.js.map → spans-XLTRZUJX.js.map} +0 -0
  102. /package/dist/{src-EAC6EB2M.js.map → src-GYWXJSR2.js.map} +0 -0
  103. /package/dist/{token-CSICKUVA.js.map → token-ZSR5DA2H.js.map} +0 -0
  104. /package/dist/{token-util-CDRNVU7M.js.map → token-util-GCRVCU73.js.map} +0 -0
  105. /package/dist/{typescript-NUKVIQFE.js.map → typescript-FUOY72ZB.js.map} +0 -0
  106. /package/dist/{wrap-ansi-BZ6N5ACL.js.map → wrap-ansi-NH7V6H4E.js.map} +0 -0
  107. /package/dist/{yaml-BTJKYTDR.js.map → yaml-EMVMCXGD.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 = 'dfd51cbb48484e4705f8b1c0ee9d5ca6020dc1ad';
4
+ process.env.DD_GIT_COMMIT_SHA = '1aad56c62730d6ff55af106e15fc3d824552243f';
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
  require_lib as require_lib2,
16
16
  require_lib2 as require_lib3,
17
17
  require_picocolors
18
- } from "./chunk-KETJT4EP.js";
18
+ } from "./chunk-FFCGZHEL.js";
19
19
  import {
20
20
  debounce_default,
21
21
  get_default,
@@ -32,20 +32,20 @@ import {
32
32
  require_lib,
33
33
  require_slugify,
34
34
  throttle_default
35
- } from "./chunk-DMJEQIZY.js";
35
+ } from "./chunk-E2MD5ZBH.js";
36
36
  import {
37
37
  require_dd_trace,
38
38
  require_js_yaml,
39
39
  require_module_details_from_path,
40
40
  require_p_limit,
41
41
  require_path_to_regexp
42
- } from "./chunk-Z7XJV4QY.js";
42
+ } from "./chunk-OPAOGRYR.js";
43
43
  import {
44
44
  require_commonjs
45
- } from "./chunk-5NOZF5M4.js";
45
+ } from "./chunk-USIYW3A4.js";
46
46
  import {
47
47
  require_dc_polyfill
48
- } from "./chunk-37IH2XAC.js";
48
+ } from "./chunk-VD5WKZGA.js";
49
49
  import {
50
50
  ATTR_SUPERBLOCKS_BASE_URL,
51
51
  ATTR_SUPERBLOCKS_CSB_ID,
@@ -54,10 +54,10 @@ import {
54
54
  SERVICE_NAME,
55
55
  getEnvironmentFromHostname,
56
56
  otlpBaseUrl
57
- } from "./chunk-D62VVYP7.js";
57
+ } from "./chunk-TN3QNAXI.js";
58
58
  import {
59
59
  require_token_error
60
- } from "./chunk-VTOGLK6A.js";
60
+ } from "./chunk-JXYTQSRN.js";
61
61
  import {
62
62
  ROOT_CONTEXT,
63
63
  SpanKind,
@@ -70,7 +70,7 @@ import {
70
70
  metrics,
71
71
  propagation,
72
72
  trace
73
- } from "./chunk-MRLWUODZ.js";
73
+ } from "./chunk-5OQ7NQV4.js";
74
74
  import {
75
75
  __commonJS,
76
76
  __esm,
@@ -79,7 +79,7 @@ import {
79
79
  __toCommonJS,
80
80
  __toESM,
81
81
  init_cjs_shims
82
- } from "./chunk-4BQDYYXS.js";
82
+ } from "./chunk-O2WVCRNM.js";
83
83
 
84
84
  // ../../../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js
85
85
  var require_constants2 = __commonJS({
@@ -98056,15 +98056,15 @@ var require_api_files = __commonJS({
98056
98056
  exports.readAppApiYamlFile = readAppApiYamlFile4;
98057
98057
  exports.resolveLanguageSpecificStepContentFromBlocks = resolveLanguageSpecificStepContentFromBlocks2;
98058
98058
  async function writeApiFiles3(...args) {
98059
- const esmFunction = await import("./api-LARDW5IF.js");
98059
+ const esmFunction = await import("./api-F6S327BR.js");
98060
98060
  return esmFunction.writeApiFiles(...args);
98061
98061
  }
98062
98062
  async function readAppApiYamlFile4(...args) {
98063
- const esmFunction = await import("./api-LARDW5IF.js");
98063
+ const esmFunction = await import("./api-F6S327BR.js");
98064
98064
  return esmFunction.readAppApiYamlFile(...args);
98065
98065
  }
98066
98066
  async function resolveLanguageSpecificStepContentFromBlocks2(...args) {
98067
- const esmFunction = await import("./api-LARDW5IF.js");
98067
+ const esmFunction = await import("./api-F6S327BR.js");
98068
98068
  return esmFunction.resolveLanguageSpecificStepContentFromBlocks(...args);
98069
98069
  }
98070
98070
  }
@@ -104752,19 +104752,19 @@ var require_getMachineId = __commonJS({
104752
104752
  if (!getMachineIdImpl) {
104753
104753
  switch (process5.platform) {
104754
104754
  case "darwin":
104755
- getMachineIdImpl = (await import("./getMachineId-darwin-UEKT5AQO.js")).getMachineId;
104755
+ getMachineIdImpl = (await import("./getMachineId-darwin-4D6IUTQ6.js")).getMachineId;
104756
104756
  break;
104757
104757
  case "linux":
104758
- getMachineIdImpl = (await import("./getMachineId-linux-YKDZF5LG.js")).getMachineId;
104758
+ getMachineIdImpl = (await import("./getMachineId-linux-LIHRJEUH.js")).getMachineId;
104759
104759
  break;
104760
104760
  case "freebsd":
104761
- getMachineIdImpl = (await import("./getMachineId-bsd-H5AFMDJ7.js")).getMachineId;
104761
+ getMachineIdImpl = (await import("./getMachineId-bsd-ENXXSRHS.js")).getMachineId;
104762
104762
  break;
104763
104763
  case "win32":
104764
- getMachineIdImpl = (await import("./getMachineId-win-ATFA4LSW.js")).getMachineId;
104764
+ getMachineIdImpl = (await import("./getMachineId-win-LHKMWQEV.js")).getMachineId;
104765
104765
  break;
104766
104766
  default:
104767
- getMachineIdImpl = (await import("./getMachineId-unsupported-N3UUYA7R.js")).getMachineId;
104767
+ getMachineIdImpl = (await import("./getMachineId-unsupported-BCZWGCE7.js")).getMachineId;
104768
104768
  break;
104769
104769
  }
104770
104770
  }
@@ -185967,8 +185967,8 @@ var require_get_vercel_oidc_token = __commonJS({
185967
185967
  }
185968
185968
  try {
185969
185969
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
185970
- await import("./token-util-CDRNVU7M.js"),
185971
- await import("./token-CSICKUVA.js")
185970
+ await import("./token-util-GCRVCU73.js"),
185971
+ await import("./token-ZSR5DA2H.js")
185972
185972
  ]);
185973
185973
  if (!token2 || isExpired(getTokenPayload(token2))) {
185974
185974
  await refreshToken();
@@ -470728,7 +470728,7 @@ var require_config_loader = __commonJS({
470728
470728
  * @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
470729
470729
  */
470730
470730
  static async loadJiti() {
470731
- const { createJiti } = await import("./jiti-3DAAO4VQ.js");
470731
+ const { createJiti } = await import("./jiti-MPIN4J4M.js");
470732
470732
  const version3 = require_package5().version;
470733
470733
  return { createJiti, version: version3 };
470734
470734
  }
@@ -471057,7 +471057,7 @@ var require_eslint_helpers = __commonJS({
471057
471057
  }
471058
471058
  async function globMatch({ basePath, pattern }) {
471059
471059
  let found = false;
471060
- const { hfs } = await import("./src-EAC6EB2M.js");
471060
+ const { hfs } = await import("./src-GYWXJSR2.js");
471061
471061
  const patternToUse = normalizeToPosix(path81.relative(basePath, pattern));
471062
471062
  const matcher = new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
471063
471063
  const walkSettings = {
@@ -471097,7 +471097,7 @@ var require_eslint_helpers = __commonJS({
471097
471097
  return new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
471098
471098
  });
471099
471099
  const unmatchedPatterns = /* @__PURE__ */ new Set([...relativeToPatterns.keys()]);
471100
- const { hfs } = await import("./src-EAC6EB2M.js");
471100
+ const { hfs } = await import("./src-GYWXJSR2.js");
471101
471101
  const walk2 = hfs.walk(basePath, {
471102
471102
  async directoryFilter(entry) {
471103
471103
  if (!matchers.some((matcher) => matcher.match(entry.path, true))) {
@@ -539506,7 +539506,7 @@ init_cjs_shims();
539506
539506
  // ../sdk/package.json
539507
539507
  var package_default = {
539508
539508
  name: "@superblocksteam/sdk",
539509
- version: "2.0.142",
539509
+ version: "2.0.143-next.0",
539510
539510
  description: "Superblocks JS SDK",
539511
539511
  homepage: "https://www.superblocks.com",
539512
539512
  license: "Superblocks Community Software License",
@@ -539863,7 +539863,7 @@ var config = void 0;
539863
539863
  var configured = false;
539864
539864
  var ddTracePromise = void 0;
539865
539865
  async function getDdTrace() {
539866
- ddTracePromise ??= import("./dd-trace-DIXLYL3I.js").then((module) => module.default);
539866
+ ddTracePromise ??= import("./dd-trace-X6BCDZFK.js").then((module) => module.default);
539867
539867
  return await ddTracePromise;
539868
539868
  }
539869
539869
  var deploymentType = (() => {
@@ -573757,7 +573757,7 @@ var MAX_ATTRIBUTE_LENGTH = 64e3;
573757
573757
  var LLMObsSpanWriter = null;
573758
573758
  async function loadLLMObsSpanWriter() {
573759
573759
  if (!LLMObsSpanWriter) {
573760
- const module = await import("./spans-CKW7WTIE.js");
573760
+ const module = await import("./spans-XLTRZUJX.js");
573761
573761
  LLMObsSpanWriter = module.default;
573762
573762
  }
573763
573763
  return LLMObsSpanWriter;
@@ -658693,7 +658693,7 @@ var PlaywrightMcpServerManager = class {
658693
658693
  this.logger.info(`Starting embedded Playwright MCP server: browser=${options8?.browser || "chromium"}, headless=${options8?.headless !== false}`);
658694
658694
  }
658695
658695
  try {
658696
- const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-AHPHYTW4.js");
658696
+ const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-2ASGKCVK.js");
658697
658697
  this.server = await startEmbeddedPlaywrightMcpServer({
658698
658698
  storageStatePath: options8?.storageStatePath,
658699
658699
  jwt: options8?.jwt,
@@ -670996,7 +670996,7 @@ function logSyncError(logger25, error40, message, attributes2 = {}) {
670996
670996
  }
670997
670997
  function isTransientAiAcceptUploadError(error40) {
670998
670998
  const msg = error40?.message ?? "";
670999
- return msg.includes("Connection closed") || msg.includes("RPC client is shutting down") || msg.includes("RPC timeout") || msg.toLowerCase().includes("deadline exceeded");
670999
+ return msg.includes("Connection closed") || msg.includes("Failed to connect to socket") || msg.includes("RPC client is shutting down") || msg.includes("RPC timeout") || msg.toLowerCase().includes("deadline exceeded");
671000
671000
  }
671001
671001
  var sleep = (ms2) => new Promise((resolve14) => setTimeout(resolve14, ms2));
671002
671002
  var SyncService = class extends import_shared61.TracedEventEmitter {
@@ -671787,21 +671787,35 @@ var SyncService = class extends import_shared61.TracedEventEmitter {
671787
671787
  "draft.has_draft": hasDraft
671788
671788
  };
671789
671789
  const report = this.draftStateReportQueue.enqueue(async () => {
671790
- try {
671791
- await this._rpcClient.call(async (rpcClient) => {
671792
- await rpcClient.call.v3.application.draftState.set({
671793
- applicationId: this.applicationId,
671794
- branchName,
671795
- hasDraft
671790
+ for (let attempt = 1; ; attempt++) {
671791
+ try {
671792
+ await this._rpcClient.call(async (rpcClient) => {
671793
+ await rpcClient.call.v3.application.draftState.set({
671794
+ applicationId: this.applicationId,
671795
+ branchName,
671796
+ hasDraft
671797
+ });
671796
671798
  });
671797
- });
671798
- this.logInfoStructured("[sync-service] Reported draft state to server", attributes2);
671799
- recordDraftStateReport("success", performance.now() - startedAt);
671800
- return true;
671801
- } catch (error40) {
671802
- logSyncError(this.getLogger(), error40, "[sync-service] Failed to report draft state to server", attributes2);
671803
- recordDraftStateReport("error", performance.now() - startedAt);
671804
- return false;
671799
+ this.logInfoStructured("[sync-service] Reported draft state to server", attributes2);
671800
+ recordDraftStateReport("success", performance.now() - startedAt);
671801
+ return true;
671802
+ } catch (error40) {
671803
+ if (isTransientAiAcceptUploadError(error40) && attempt < AI_ACCEPT_UPLOAD_MAX_ATTEMPTS) {
671804
+ const errorMeta = getErrorMeta2(error40);
671805
+ this.logInfoStructured("[sync-service] Retrying draft state report after transient error [expected]", {
671806
+ ...attributes2,
671807
+ attempt,
671808
+ errorKind: errorMeta.error.kind,
671809
+ errorMessage: errorMeta.error.message,
671810
+ nextAttempt: attempt + 1
671811
+ });
671812
+ await sleep(AI_ACCEPT_UPLOAD_RETRY_DELAY_MS);
671813
+ continue;
671814
+ }
671815
+ logSyncError(this.getLogger(), error40, "[sync-service] Failed to report draft state to server", attributes2);
671816
+ recordDraftStateReport("error", performance.now() - startedAt);
671817
+ return false;
671818
+ }
671805
671819
  }
671806
671820
  });
671807
671821
  this.draftStateReports.set(hasDraft, report);
@@ -672589,7 +672603,7 @@ var import_shared67 = __toESM(require_dist2());
672589
672603
  // ../../../vite-plugin-file-sync/package.json
672590
672604
  var package_default2 = {
672591
672605
  name: "@superblocksteam/vite-plugin-file-sync",
672592
- version: "2.0.142",
672606
+ version: "2.0.143-next.0",
672593
672607
  keywords: [
672594
672608
  "vite-plugin"
672595
672609
  ],
@@ -672842,6 +672856,9 @@ var AutoConnectingRpcClient = class {
672842
672856
  _logger;
672843
672857
  _rpcClient = null;
672844
672858
  _isShuttingDown = false;
672859
+ _closePromise = null;
672860
+ _connectPromise = null;
672861
+ _connectEpoch = 0;
672845
672862
  _activeOperations = 0;
672846
672863
  _socketCloseCode;
672847
672864
  constructor(superblocksBaseUrl, authToken, _tracer, tokenManager, _logger) {
@@ -672874,55 +672891,86 @@ var AutoConnectingRpcClient = class {
672874
672891
  get baseUrl() {
672875
672892
  return this.superblocksBaseUrl;
672876
672893
  }
672894
+ async waitUntilReady() {
672895
+ if (this._closePromise) {
672896
+ await this._closePromise;
672897
+ }
672898
+ }
672877
672899
  async getRpcClient() {
672878
- if (this._isShuttingDown) {
672879
- throw new Error("RPC client is shutting down");
672900
+ await this.waitUntilReady();
672901
+ if (this._rpcClient) {
672902
+ return this._rpcClient;
672880
672903
  }
672881
- if (!this._rpcClient) {
672882
- let connectionAttempts = 0;
672883
- while (connectionAttempts < 3) {
672884
- try {
672885
- this._rpcClient = await connectToISocketRPCServer({
672886
- superblocksBaseUrl: this.superblocksBaseUrl,
672887
- token: this.authToken,
672888
- tracer: this._tracer,
672889
- onClose: (event) => {
672890
- this.getLogger().info(`[rpc-client] socket closed with code: ${event.code}`);
672891
- this._socketCloseCode = event.code;
672904
+ if (!this._connectPromise) {
672905
+ this._connectPromise = this.connect().finally(() => {
672906
+ this._connectPromise = null;
672907
+ });
672908
+ }
672909
+ return this._connectPromise;
672910
+ }
672911
+ async connect() {
672912
+ const epoch = this._connectEpoch;
672913
+ let client = null;
672914
+ let connectionAttempts = 0;
672915
+ while (connectionAttempts < 3) {
672916
+ try {
672917
+ client = await connectToISocketRPCServer({
672918
+ superblocksBaseUrl: this.superblocksBaseUrl,
672919
+ token: this.authToken,
672920
+ tracer: this._tracer,
672921
+ onClose: (event) => {
672922
+ this.getLogger().info(`[rpc-client] socket closed with code: ${event.code}`);
672923
+ this._socketCloseCode = event.code;
672924
+ if (this._rpcClient === client) {
672892
672925
  this._rpcClient = null;
672893
672926
  }
672894
- });
672895
- } catch (error40) {
672896
- connectionAttempts++;
672897
- console.error(`Failed on attempt ${connectionAttempts} to get connection:`, error40.message);
672898
- }
672899
- if (this._rpcClient) {
672900
- break;
672901
- }
672902
- await new Promise((resolve14) => setTimeout(resolve14, 5e3));
672927
+ }
672928
+ });
672929
+ } catch (error40) {
672930
+ connectionAttempts++;
672931
+ console.error(`Failed on attempt ${connectionAttempts} to get connection:`, error40.message);
672932
+ }
672933
+ if (client) {
672934
+ break;
672903
672935
  }
672936
+ await new Promise((resolve14) => setTimeout(resolve14, 5e3));
672904
672937
  }
672905
- if (!this._rpcClient) {
672938
+ if (!client) {
672906
672939
  throw new Error("Failed to connect to socket after 3 attempts");
672907
672940
  }
672908
- return this._rpcClient;
672941
+ if (epoch !== this._connectEpoch) {
672942
+ try {
672943
+ await client.close();
672944
+ } catch {
672945
+ }
672946
+ throw new Error("RPC client is shutting down");
672947
+ }
672948
+ this._rpcClient = client;
672949
+ return client;
672909
672950
  }
672910
672951
  /**
672911
672952
  * Executes an RPC operations with lifecycle management.
672912
672953
  */
672913
672954
  async call(operation) {
672914
- if (this._isShuttingDown) {
672915
- throw new Error("RPC client is shutting down");
672916
- }
672955
+ const client = await this.getRpcClient();
672917
672956
  this._activeOperations++;
672918
672957
  try {
672919
- const client = await this.getRpcClient();
672920
672958
  return await operation(client);
672921
672959
  } finally {
672922
672960
  this._activeOperations--;
672923
672961
  }
672924
672962
  }
672925
- async close() {
672963
+ close() {
672964
+ if (!this._closePromise) {
672965
+ this._connectEpoch++;
672966
+ this._connectPromise = null;
672967
+ this._closePromise = this.doClose().finally(() => {
672968
+ this._closePromise = null;
672969
+ });
672970
+ }
672971
+ return this._closePromise;
672972
+ }
672973
+ async doClose() {
672926
672974
  this._isShuttingDown = true;
672927
672975
  const maxWaitTime = 5e3;
672928
672976
  const startTime = Date.now();
@@ -672933,11 +672981,32 @@ var AutoConnectingRpcClient = class {
672933
672981
  this.getLogger().warn(`[rpc-client] Forced shutdown of RPC client with ${this._activeOperations} active operations`);
672934
672982
  }
672935
672983
  if (this._rpcClient) {
672936
- await this._rpcClient.close();
672984
+ const client = this._rpcClient;
672937
672985
  this._rpcClient = null;
672986
+ await this.closeWithTimeout(client, maxWaitTime);
672938
672987
  }
672939
672988
  this._isShuttingDown = false;
672940
672989
  }
672990
+ async closeWithTimeout(client, timeoutMs) {
672991
+ let timer;
672992
+ try {
672993
+ await Promise.race([
672994
+ Promise.resolve(client.close()),
672995
+ new Promise((resolve14) => {
672996
+ timer = setTimeout(() => {
672997
+ this.getLogger().warn(`[rpc-client] socket close() exceeded ${timeoutMs}ms; abandoning it and reconnecting on next call`);
672998
+ resolve14();
672999
+ }, timeoutMs);
673000
+ })
673001
+ ]);
673002
+ } catch (error40) {
673003
+ this.getLogger().warn(`[rpc-client] socket close() failed; reconnecting on next call`, getErrorMeta2(error40));
673004
+ } finally {
673005
+ if (timer) {
673006
+ clearTimeout(timer);
673007
+ }
673008
+ }
673009
+ }
672941
673010
  };
672942
673011
 
672943
673012
  // ../../../vite-plugin-file-sync/dist/file-sync-vite-plugin.js
@@ -696991,7 +697060,7 @@ var parseYaml3;
696991
697060
  async function loadYaml(file2) {
696992
697061
  const content19 = await read_file_default(file2);
696993
697062
  if (!parseYaml3) {
696994
- ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-BTJKYTDR.js"));
697063
+ ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-EMVMCXGD.js"));
696995
697064
  }
696996
697065
  try {
696997
697066
  return parseYaml3(content19);
@@ -702385,7 +702454,7 @@ function createParsersAndPrinters(modules) {
702385
702454
  }
702386
702455
  var estreePlugin = createParsersAndPrinters([
702387
702456
  {
702388
- importPlugin: () => import("./estree-BWWXK5NG.js"),
702457
+ importPlugin: () => import("./estree-V3HH6CSB.js"),
702389
702458
  printers: ["estree", "estree-json"]
702390
702459
  }
702391
702460
  ]);
@@ -702409,11 +702478,11 @@ var languages = [
702409
702478
  ];
702410
702479
  var { parsers: parsers12, printers } = createParsersAndPrinters([
702411
702480
  {
702412
- importPlugin: () => import("./acorn-KXCBAFWI.js"),
702481
+ importPlugin: () => import("./acorn-AJDVE4QH.js"),
702413
702482
  parsers: ["acorn", "espree"]
702414
702483
  },
702415
702484
  {
702416
- importPlugin: () => import("./angular-W2CRMTFW.js"),
702485
+ importPlugin: () => import("./angular-HCD74UUN.js"),
702417
702486
  parsers: [
702418
702487
  "__ng_action",
702419
702488
  "__ng_binding",
@@ -702422,7 +702491,7 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
702422
702491
  ]
702423
702492
  },
702424
702493
  {
702425
- importPlugin: () => import("./babel-ET2JKKKV.js"),
702494
+ importPlugin: () => import("./babel-DGXGAC2V.js"),
702426
702495
  parsers: [
702427
702496
  "babel",
702428
702497
  "babel-flow",
@@ -702441,44 +702510,44 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
702441
702510
  ]
702442
702511
  },
702443
702512
  {
702444
- importPlugin: () => import("./flow-BABUYUAN.js"),
702513
+ importPlugin: () => import("./flow-LYVD3HXK.js"),
702445
702514
  parsers: ["flow"]
702446
702515
  },
702447
702516
  {
702448
- importPlugin: () => import("./glimmer-PIGMF34I.js"),
702517
+ importPlugin: () => import("./glimmer-MHZASOJO.js"),
702449
702518
  parsers: ["glimmer"],
702450
702519
  printers: ["glimmer"]
702451
702520
  },
702452
702521
  {
702453
- importPlugin: () => import("./graphql-WSH7PVPC.js"),
702522
+ importPlugin: () => import("./graphql-CW7EUSGS.js"),
702454
702523
  parsers: ["graphql"],
702455
702524
  printers: ["graphql"]
702456
702525
  },
702457
702526
  {
702458
- importPlugin: () => import("./html-66PGBSYM.js"),
702527
+ importPlugin: () => import("./html-BW7OUCKU.js"),
702459
702528
  parsers: ["html", "angular", "vue", "lwc", "mjml"],
702460
702529
  printers: ["html"]
702461
702530
  },
702462
702531
  {
702463
- importPlugin: () => import("./markdown-GSUXGRSV.js"),
702532
+ importPlugin: () => import("./markdown-7N4D66SE.js"),
702464
702533
  parsers: ["markdown", "mdx", "remark"],
702465
702534
  printers: ["mdast"]
702466
702535
  },
702467
702536
  {
702468
- importPlugin: () => import("./meriyah-ZXTRD3KN.js"),
702537
+ importPlugin: () => import("./meriyah-O7NDPHVK.js"),
702469
702538
  parsers: ["meriyah"]
702470
702539
  },
702471
702540
  {
702472
- importPlugin: () => import("./postcss-IN2KOCZO.js"),
702541
+ importPlugin: () => import("./postcss-RVIBE46M.js"),
702473
702542
  parsers: ["css", "less", "scss"],
702474
702543
  printers: ["postcss"]
702475
702544
  },
702476
702545
  {
702477
- importPlugin: () => import("./typescript-NUKVIQFE.js"),
702546
+ importPlugin: () => import("./typescript-FUOY72ZB.js"),
702478
702547
  parsers: ["typescript"]
702479
702548
  },
702480
702549
  {
702481
- importPlugin: () => import("./yaml-BTJKYTDR.js"),
702550
+ importPlugin: () => import("./yaml-EMVMCXGD.js"),
702482
702551
  parsers: ["yaml"],
702483
702552
  printers: ["yaml"]
702484
702553
  }
@@ -721116,7 +721185,7 @@ async function handleLockConflict(error40, lockSvc, span, logger25) {
721116
721185
  }
721117
721186
  async function readPkgJson(cwd) {
721118
721187
  try {
721119
- const { readPackage } = await import("./read-pkg-S5NV3S65.js");
721188
+ const { readPackage } = await import("./read-pkg-DLPUGD3L.js");
721120
721189
  return await readPackage({ cwd });
721121
721190
  } catch {
721122
721191
  return null;
@@ -722991,4 +723060,4 @@ serve-static/index.js:
722991
723060
  chokidar/esm/index.js:
722992
723061
  (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
722993
723062
  */
722994
- //# sourceMappingURL=chunk-U6IRPEPT.js.map
723063
+ //# sourceMappingURL=chunk-NNL3Y6H7.js.map