@tradejs/cli 2.0.5 → 2.0.7

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.
@@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  ));
35
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
36
 
37
- // ../../node_modules/debug/node_modules/ms/index.js
37
+ // ../../node_modules/ms/index.js
38
38
  var require_ms = __commonJS({
39
- "../../node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
39
+ "../../node_modules/ms/index.js"(exports2, module2) {
40
40
  "use strict";
41
41
  var s = 1e3;
42
42
  var m = s * 60;
@@ -151,9 +151,9 @@ var require_ms = __commonJS({
151
151
  }
152
152
  });
153
153
 
154
- // ../../node_modules/debug/src/common.js
154
+ // ../../node_modules/list-it/node_modules/debug/src/common.js
155
155
  var require_common = __commonJS({
156
- "../../node_modules/debug/src/common.js"(exports2, module2) {
156
+ "../../node_modules/list-it/node_modules/debug/src/common.js"(exports2, module2) {
157
157
  "use strict";
158
158
  function setup(env) {
159
159
  createDebug.debug = createDebug;
@@ -255,50 +255,64 @@ var require_common = __commonJS({
255
255
  createDebug.namespaces = namespaces;
256
256
  createDebug.names = [];
257
257
  createDebug.skips = [];
258
- let i;
259
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
260
- const len = split.length;
261
- for (i = 0; i < len; i++) {
262
- if (!split[i]) {
263
- continue;
258
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
259
+ for (const ns of split) {
260
+ if (ns[0] === "-") {
261
+ createDebug.skips.push(ns.slice(1));
262
+ } else {
263
+ createDebug.names.push(ns);
264
264
  }
265
- namespaces = split[i].replace(/\*/g, ".*?");
266
- if (namespaces[0] === "-") {
267
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
265
+ }
266
+ }
267
+ function matchesTemplate(search, template) {
268
+ let searchIndex = 0;
269
+ let templateIndex = 0;
270
+ let starIndex = -1;
271
+ let matchIndex = 0;
272
+ while (searchIndex < search.length) {
273
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
274
+ if (template[templateIndex] === "*") {
275
+ starIndex = templateIndex;
276
+ matchIndex = searchIndex;
277
+ templateIndex++;
278
+ } else {
279
+ searchIndex++;
280
+ templateIndex++;
281
+ }
282
+ } else if (starIndex !== -1) {
283
+ templateIndex = starIndex + 1;
284
+ matchIndex++;
285
+ searchIndex = matchIndex;
268
286
  } else {
269
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
287
+ return false;
270
288
  }
271
289
  }
290
+ while (templateIndex < template.length && template[templateIndex] === "*") {
291
+ templateIndex++;
292
+ }
293
+ return templateIndex === template.length;
272
294
  }
273
295
  function disable() {
274
296
  const namespaces = [
275
- ...createDebug.names.map(toNamespace),
276
- ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
297
+ ...createDebug.names,
298
+ ...createDebug.skips.map((namespace) => "-" + namespace)
277
299
  ].join(",");
278
300
  createDebug.enable("");
279
301
  return namespaces;
280
302
  }
281
303
  function enabled(name) {
282
- if (name[name.length - 1] === "*") {
283
- return true;
284
- }
285
- let i;
286
- let len;
287
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
288
- if (createDebug.skips[i].test(name)) {
304
+ for (const skip of createDebug.skips) {
305
+ if (matchesTemplate(name, skip)) {
289
306
  return false;
290
307
  }
291
308
  }
292
- for (i = 0, len = createDebug.names.length; i < len; i++) {
293
- if (createDebug.names[i].test(name)) {
309
+ for (const ns of createDebug.names) {
310
+ if (matchesTemplate(name, ns)) {
294
311
  return true;
295
312
  }
296
313
  }
297
314
  return false;
298
315
  }
299
- function toNamespace(regexp) {
300
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
301
- }
302
316
  function coerce(val) {
303
317
  if (val instanceof Error) {
304
318
  return val.stack || val.message;
@@ -315,9 +329,9 @@ var require_common = __commonJS({
315
329
  }
316
330
  });
317
331
 
318
- // ../../node_modules/debug/src/browser.js
332
+ // ../../node_modules/list-it/node_modules/debug/src/browser.js
319
333
  var require_browser = __commonJS({
320
- "../../node_modules/debug/src/browser.js"(exports2, module2) {
334
+ "../../node_modules/list-it/node_modules/debug/src/browser.js"(exports2, module2) {
321
335
  "use strict";
322
336
  exports2.formatArgs = formatArgs;
323
337
  exports2.save = save;
@@ -418,10 +432,11 @@ var require_browser = __commonJS({
418
432
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
419
433
  return false;
420
434
  }
435
+ let m;
421
436
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
422
437
  typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
423
438
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
424
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
439
+ typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
425
440
  typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
426
441
  }
427
442
  function formatArgs(args2) {
@@ -459,7 +474,7 @@ var require_browser = __commonJS({
459
474
  function load() {
460
475
  let r;
461
476
  try {
462
- r = exports2.storage.getItem("debug");
477
+ r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
463
478
  } catch (error) {
464
479
  }
465
480
  if (!r && typeof process !== "undefined" && "env" in process) {
@@ -600,9 +615,9 @@ var require_supports_color = __commonJS({
600
615
  }
601
616
  });
602
617
 
603
- // ../../node_modules/debug/src/node.js
618
+ // ../../node_modules/list-it/node_modules/debug/src/node.js
604
619
  var require_node = __commonJS({
605
- "../../node_modules/debug/src/node.js"(exports2, module2) {
620
+ "../../node_modules/list-it/node_modules/debug/src/node.js"(exports2, module2) {
606
621
  "use strict";
607
622
  var tty = require("tty");
608
623
  var util = require("util");
@@ -743,7 +758,7 @@ var require_node = __commonJS({
743
758
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
744
759
  }
745
760
  function log(...args2) {
746
- return process.stderr.write(util.format(...args2) + "\n");
761
+ return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args2) + "\n");
747
762
  }
748
763
  function save(namespaces) {
749
764
  if (namespaces) {
@@ -775,9 +790,9 @@ var require_node = __commonJS({
775
790
  }
776
791
  });
777
792
 
778
- // ../../node_modules/debug/src/index.js
793
+ // ../../node_modules/list-it/node_modules/debug/src/index.js
779
794
  var require_src = __commonJS({
780
- "../../node_modules/debug/src/index.js"(exports2, module2) {
795
+ "../../node_modules/list-it/node_modules/debug/src/index.js"(exports2, module2) {
781
796
  "use strict";
782
797
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
783
798
  module2.exports = require_browser();
@@ -1626,6 +1641,11 @@ __export(aiExport_exports, {
1626
1641
  module.exports = __toCommonJS(aiExport_exports);
1627
1642
  var import_args = __toESM(require("args"));
1628
1643
  var import_chalk2 = __toESM(require("chalk"));
1644
+ var import_promises2 = __toESM(require("fs/promises"));
1645
+ var import_progress = __toESM(require("progress"));
1646
+ var import_ai2 = require("@tradejs/infra/ai");
1647
+
1648
+ // src/lib/aiExport.ts
1629
1649
  var import_promises = __toESM(require("fs/promises"));
1630
1650
  var import_path = __toESM(require("path"));
1631
1651
  var import_ai = require("@tradejs/infra/ai");
@@ -1669,6 +1689,139 @@ var loadBacktestCheckpointResults = async ({
1669
1689
  import_redis.redisKeys.backtestRunResults(userName, runId)
1670
1690
  );
1671
1691
 
1692
+ // src/lib/aiExport.ts
1693
+ var resolveRunScopedAiChunks = async ({
1694
+ outDir,
1695
+ requestedRunId,
1696
+ strategyName,
1697
+ userName
1698
+ }) => {
1699
+ const resolvedRunId = String(requestedRunId || "").trim();
1700
+ const runIds = resolvedRunId ? [resolvedRunId] : await (0, import_ai.listAiChunkRunIds)({ strategyName, outDir });
1701
+ const runId = runIds.at(-1) ?? "";
1702
+ if (!runId) {
1703
+ return null;
1704
+ }
1705
+ const chunkFiles = await (0, import_ai.listAiChunkFiles)({ strategyName, outDir, runId });
1706
+ if (!chunkFiles.length) {
1707
+ return {
1708
+ runId,
1709
+ chunkFiles,
1710
+ completedAttemptKeys: /* @__PURE__ */ new Set()
1711
+ };
1712
+ }
1713
+ const completed = await loadBacktestCheckpointResults({ runId, userName });
1714
+ return {
1715
+ runId,
1716
+ chunkFiles,
1717
+ completedAttemptKeys: buildCompletedBacktestDatasetAttemptKeys(completed)
1718
+ };
1719
+ };
1720
+ var exportAiStrategy = async (params) => {
1721
+ const {
1722
+ outDir,
1723
+ strategyName,
1724
+ keepChunks,
1725
+ requestedRunId,
1726
+ userName,
1727
+ now = Date.now
1728
+ } = params;
1729
+ const partMonths = Math.max(0, Math.trunc(Number(params.partMonths) || 0));
1730
+ const runScopedChunks = await resolveRunScopedAiChunks({
1731
+ outDir,
1732
+ requestedRunId,
1733
+ strategyName,
1734
+ userName
1735
+ });
1736
+ const chunkFiles = runScopedChunks ? runScopedChunks.chunkFiles : await (0, import_ai.listAiChunkFiles)({ strategyName, outDir });
1737
+ if (!chunkFiles.length) {
1738
+ return null;
1739
+ }
1740
+ if (runScopedChunks && runScopedChunks.completedAttemptKeys.size === 0) {
1741
+ throw new Error(
1742
+ `No completed checkpoint attempts found for AI export run "${runScopedChunks.runId}"`
1743
+ );
1744
+ }
1745
+ const completedAttemptCount = runScopedChunks?.completedAttemptKeys.size ?? void 0;
1746
+ const mergedPath = import_path.default.join(
1747
+ outDir,
1748
+ `ai-dataset-${(0, import_ai.toFileToken)(strategyName)}-merged-${now()}.jsonl`
1749
+ );
1750
+ await (0, import_ai.mergeAiJsonlFiles)({
1751
+ filePaths: chunkFiles,
1752
+ outPath: mergedPath,
1753
+ shouldIncludeRow: runScopedChunks ? (row) => isBacktestDatasetRowForCompletedAttempt(
1754
+ row,
1755
+ runScopedChunks.completedAttemptKeys
1756
+ ) : void 0
1757
+ });
1758
+ runScopedChunks?.completedAttemptKeys.clear();
1759
+ const splitResult = partMonths > 0 ? await (0, import_ai.splitAiMergedDatasetFile)({
1760
+ filePath: mergedPath,
1761
+ monthsPerPart: partMonths
1762
+ }) : {
1763
+ partPaths: [mergedPath],
1764
+ partCount: 1,
1765
+ splitApplied: false
1766
+ };
1767
+ const shouldDeleteChunks = !keepChunks;
1768
+ if (shouldDeleteChunks) {
1769
+ for (const filePath of chunkFiles) {
1770
+ await import_promises.default.rm(filePath, { force: true });
1771
+ }
1772
+ }
1773
+ return {
1774
+ strategyName,
1775
+ sourceChunkCount: chunkFiles.length,
1776
+ deleteChunks: shouldDeleteChunks,
1777
+ partMonths,
1778
+ partPaths: splitResult.partPaths,
1779
+ partCount: splitResult.partCount,
1780
+ splitApplied: splitResult.splitApplied,
1781
+ runId: runScopedChunks?.runId,
1782
+ completedAttemptCount
1783
+ };
1784
+ };
1785
+ var exportAiStrategiesSequentially = async (params, dependencies = {}) => {
1786
+ const { strategyNames, onProgress, ...strategyParams } = params;
1787
+ const runExport = dependencies.exportStrategy ?? exportAiStrategy;
1788
+ const results = [];
1789
+ const total = strategyNames.length;
1790
+ for (let index = 0; index < strategyNames.length; index += 1) {
1791
+ const strategyName = strategyNames[index];
1792
+ onProgress?.({
1793
+ strategyName,
1794
+ current: index,
1795
+ total,
1796
+ status: "started"
1797
+ });
1798
+ try {
1799
+ const result = await runExport({
1800
+ ...strategyParams,
1801
+ strategyName
1802
+ });
1803
+ if (result) {
1804
+ results.push(result);
1805
+ }
1806
+ onProgress?.({
1807
+ strategyName,
1808
+ current: index + 1,
1809
+ total,
1810
+ status: result ? "completed" : "skipped"
1811
+ });
1812
+ } catch (error) {
1813
+ onProgress?.({
1814
+ strategyName,
1815
+ current: index,
1816
+ total,
1817
+ status: "failed"
1818
+ });
1819
+ throw error;
1820
+ }
1821
+ }
1822
+ return results;
1823
+ };
1824
+
1672
1825
  // src/scripts/selectStrategy.ts
1673
1826
  var import_readline = __toESM(require("readline"));
1674
1827
  var import_chalk = __toESM(require("chalk"));
@@ -1735,12 +1888,14 @@ var selectStrategy = async (promptLabel = "Select strategy", options) => {
1735
1888
  };
1736
1889
 
1737
1890
  // src/scripts/resolveExportStrategy.ts
1891
+ var ALL_EXPORT_STRATEGIES = "all";
1738
1892
  var resolveExportStrategy = async ({
1739
1893
  explicitStrategy,
1740
1894
  outDir,
1741
1895
  datasetLabel,
1742
1896
  promptLabel,
1743
- listStrategies
1897
+ listStrategies,
1898
+ includeAllOption = false
1744
1899
  }) => {
1745
1900
  const raw = String(explicitStrategy || "").trim();
1746
1901
  if (raw) {
@@ -1758,8 +1913,9 @@ var resolveExportStrategy = async ({
1758
1913
  `Multiple ${datasetLabel} chunk strategies found in ${outDir}: ${availableStrategies.join(", ")}. Pass --strategy.`
1759
1914
  );
1760
1915
  }
1916
+ const promptStrategies = includeAllOption ? [...availableStrategies, ALL_EXPORT_STRATEGIES] : availableStrategies;
1761
1917
  return selectStrategy(promptLabel, {
1762
- strategies: availableStrategies,
1918
+ strategies: promptStrategies,
1763
1919
  defaultStrategy: availableStrategies[0]
1764
1920
  });
1765
1921
  };
@@ -1788,110 +1944,81 @@ import_args.default.option(
1788
1944
  "root"
1789
1945
  );
1790
1946
  var flags = import_args.default.parse(process.argv);
1791
- var resolveRunScopedAiChunks = async ({
1792
- outDir,
1793
- strategyName
1794
- }) => {
1795
- const requestedRunId = typeof flags.runId === "string" && flags.runId.trim() ? flags.runId.trim() : "";
1796
- const runIds = requestedRunId ? [requestedRunId] : await (0, import_ai.listAiChunkRunIds)({ strategyName, outDir });
1797
- const runId = runIds.at(-1) ?? "";
1798
- if (!runId) {
1799
- return null;
1800
- }
1801
- const chunkFiles = await (0, import_ai.listAiChunkFiles)({ strategyName, outDir, runId });
1802
- if (!chunkFiles.length) {
1803
- return {
1804
- runId,
1805
- chunkFiles,
1806
- completedAttemptKeys: /* @__PURE__ */ new Set()
1807
- };
1808
- }
1809
- const userName = String(flags.user || "root");
1810
- const completed = await loadBacktestCheckpointResults({ runId, userName });
1811
- return {
1812
- runId,
1813
- chunkFiles,
1814
- completedAttemptKeys: buildCompletedBacktestDatasetAttemptKeys(completed)
1815
- };
1947
+ var printExportResult = (result) => {
1948
+ console.log(
1949
+ import_chalk2.default.green(
1950
+ result.splitApplied ? `Merged AI dataset for ${result.strategyName} saved as ${result.partCount} part files` : `Merged AI dataset saved: ${result.partPaths[0]}`
1951
+ )
1952
+ );
1953
+ result.partPaths.forEach((filePath, index) => {
1954
+ console.log(import_chalk2.default.gray(`part${index + 1}: ${filePath}`));
1955
+ });
1956
+ console.log(
1957
+ import_chalk2.default.gray(
1958
+ `strategy=${result.strategyName}, source_chunks=${result.sourceChunkCount}, deleteChunks=${Boolean(
1959
+ result.deleteChunks
1960
+ )}, partMonths=${result.partMonths}, partCount=${result.partCount}${result.runId ? `, runId=${result.runId}, completedAttempts=${result.completedAttemptCount}` : ""}`
1961
+ )
1962
+ );
1816
1963
  };
1817
1964
  var main = async () => {
1818
1965
  const outDir = String(flags.outDir || "data/ai/export");
1819
- await import_promises.default.mkdir(outDir, { recursive: true });
1966
+ await import_promises2.default.mkdir(outDir, { recursive: true });
1820
1967
  const strategyName = await resolveExportStrategy({
1821
1968
  explicitStrategy: String(flags.strategy || ""),
1822
1969
  outDir,
1823
1970
  datasetLabel: "AI",
1824
1971
  promptLabel: "Select AI export strategy",
1825
- listStrategies: import_ai.listAiChunkStrategies
1972
+ listStrategies: import_ai2.listAiChunkStrategies,
1973
+ includeAllOption: true
1826
1974
  });
1827
1975
  if (!strategyName) {
1828
1976
  console.log(import_chalk2.default.yellow(`No AI chunk files found in ${outDir}`));
1829
- process.exit(0);
1977
+ return;
1830
1978
  }
1831
- const runScopedChunks = await resolveRunScopedAiChunks({
1832
- strategyName,
1833
- outDir
1834
- });
1835
- const chunkFiles = runScopedChunks ? runScopedChunks.chunkFiles : await (0, import_ai.listAiChunkFiles)({
1836
- strategyName,
1837
- outDir
1979
+ const strategyNames = strategyName === ALL_EXPORT_STRATEGIES ? await (0, import_ai2.listAiChunkStrategies)({ outDir }) : [strategyName];
1980
+ if (!strategyNames.length) {
1981
+ console.log(import_chalk2.default.yellow(`No AI chunk files found in ${outDir}`));
1982
+ return;
1983
+ }
1984
+ const progressBar = strategyNames.length > 1 ? new import_progress.default(":current/:total [:bar] :percent :strategy :status", {
1985
+ total: strategyNames.length,
1986
+ width: 30
1987
+ }) : null;
1988
+ const results = await exportAiStrategiesSequentially({
1989
+ outDir,
1990
+ strategyNames,
1991
+ keepChunks: Boolean(flags.keepChunks),
1992
+ partMonths: Number(flags.partMonths),
1993
+ requestedRunId: typeof flags.runId === "string" ? flags.runId.trim() : void 0,
1994
+ userName: String(flags.user || "root"),
1995
+ onProgress: progressBar ? ({ strategyName: currentStrategy, status }) => {
1996
+ const progressStatus = status === "started" ? "exporting" : status;
1997
+ if (status === "started" || status === "failed") {
1998
+ progressBar.tick(0, {
1999
+ strategy: currentStrategy,
2000
+ status: progressStatus
2001
+ });
2002
+ if (status === "failed") {
2003
+ progressBar.terminate();
2004
+ }
2005
+ return;
2006
+ }
2007
+ progressBar.tick(1, {
2008
+ strategy: currentStrategy,
2009
+ status: progressStatus
2010
+ });
2011
+ } : void 0
1838
2012
  });
1839
- if (!chunkFiles.length) {
2013
+ if (!results.length) {
1840
2014
  console.log(
1841
2015
  import_chalk2.default.yellow(
1842
- `No chunk files found for strategy "${strategyName}" in ${outDir}`
2016
+ strategyNames.length === 1 ? `No chunk files found for strategy "${strategyNames[0]}" in ${outDir}` : `No AI chunk files were exported from ${outDir}`
1843
2017
  )
1844
2018
  );
1845
- process.exit(0);
2019
+ return;
1846
2020
  }
1847
- if (runScopedChunks && runScopedChunks.completedAttemptKeys.size === 0) {
1848
- throw new Error(
1849
- `No completed checkpoint attempts found for AI export run "${runScopedChunks.runId}"`
1850
- );
1851
- }
1852
- const mergedPath = import_path.default.join(
1853
- outDir,
1854
- `ai-dataset-${(0, import_ai.toFileToken)(strategyName)}-merged-${Date.now()}.jsonl`
1855
- );
1856
- await (0, import_ai.mergeAiJsonlFiles)({
1857
- filePaths: chunkFiles,
1858
- outPath: mergedPath,
1859
- shouldIncludeRow: runScopedChunks ? (row) => isBacktestDatasetRowForCompletedAttempt(
1860
- row,
1861
- runScopedChunks.completedAttemptKeys
1862
- ) : void 0
1863
- });
1864
- const partMonths = Math.max(0, Math.trunc(Number(flags.partMonths) || 0));
1865
- const splitResult = partMonths > 0 ? await (0, import_ai.splitAiMergedDatasetFile)({
1866
- filePath: mergedPath,
1867
- monthsPerPart: partMonths
1868
- }) : {
1869
- partPaths: [mergedPath],
1870
- partCount: 1,
1871
- splitApplied: false
1872
- };
1873
- const shouldDeleteChunks = !Boolean(flags.keepChunks);
1874
- if (shouldDeleteChunks) {
1875
- for (const filePath of chunkFiles) {
1876
- await import_promises.default.rm(filePath, { force: true });
1877
- }
1878
- }
1879
- console.log(
1880
- import_chalk2.default.green(
1881
- splitResult.splitApplied ? `Merged AI dataset saved as ${splitResult.partCount} part files` : `Merged AI dataset saved: ${splitResult.partPaths[0]}`
1882
- )
1883
- );
1884
- splitResult.partPaths.forEach((filePath, index) => {
1885
- console.log(import_chalk2.default.gray(`part${index + 1}: ${filePath}`));
1886
- });
1887
- console.log(
1888
- import_chalk2.default.gray(
1889
- `strategy=${strategyName}, source_chunks=${chunkFiles.length}, deleteChunks=${Boolean(
1890
- shouldDeleteChunks
1891
- )}, partMonths=${partMonths}, partCount=${splitResult.partCount}${runScopedChunks ? `, runId=${runScopedChunks.runId}, completedAttempts=${runScopedChunks.completedAttemptKeys.size}` : ""}`
1892
- )
1893
- );
1894
- process.exit(0);
2021
+ results.forEach(printExportResult);
1895
2022
  };
1896
2023
  // Annotate the CommonJS export names for ESM import in node:
1897
2024
  0 && (module.exports = {