aerocoding 0.1.29 → 0.1.30
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/index.js +184 -100
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1322,8 +1322,17 @@ async function createCommand(projectName, options) {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
} catch {
|
|
1324
1324
|
}
|
|
1325
|
-
let backendTemplateId
|
|
1325
|
+
let backendTemplateId;
|
|
1326
|
+
let frontendTemplateId;
|
|
1326
1327
|
const hasBackend = !!project.backendFramework;
|
|
1328
|
+
const hasFrontend = !!project.frontendFramework;
|
|
1329
|
+
if (options.template) {
|
|
1330
|
+
if (hasBackend) {
|
|
1331
|
+
backendTemplateId = options.template;
|
|
1332
|
+
} else if (hasFrontend) {
|
|
1333
|
+
frontendTemplateId = options.template;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1327
1336
|
if (hasBackend && !backendTemplateId) {
|
|
1328
1337
|
const templateSpinner = p.spinner();
|
|
1329
1338
|
templateSpinner.start("Loading backend templates...");
|
|
@@ -1350,9 +1359,7 @@ async function createCommand(projectName, options) {
|
|
|
1350
1359
|
backendTemplateId = selectedTemplate;
|
|
1351
1360
|
}
|
|
1352
1361
|
}
|
|
1353
|
-
|
|
1354
|
-
const hasFrontend = !!project.frontendFramework;
|
|
1355
|
-
if (hasFrontend) {
|
|
1362
|
+
if (hasFrontend && !frontendTemplateId) {
|
|
1356
1363
|
const frontendSpinner = p.spinner();
|
|
1357
1364
|
frontendSpinner.start("Loading frontend templates...");
|
|
1358
1365
|
const frontendResult = await apiClient.getTemplates({
|
|
@@ -1502,9 +1509,10 @@ async function createCommand(projectName, options) {
|
|
|
1502
1509
|
const totalEstimatedFiles = backendEstimatedFiles.length + frontendEstimatedFiles.length;
|
|
1503
1510
|
const totalEstimatedEntities = backendEstimatedEntities + frontendEstimatedEntities;
|
|
1504
1511
|
const hasEnoughCredits = totalEstimatedCredits === 0 || creditsRemaining >= totalEstimatedCredits;
|
|
1512
|
+
const divider = ` ${"-".repeat(33)}`;
|
|
1505
1513
|
console.log("");
|
|
1506
1514
|
console.log(chalk7.bold(" Generation Summary"));
|
|
1507
|
-
console.log(chalk7.gray(
|
|
1515
|
+
console.log(chalk7.gray(divider));
|
|
1508
1516
|
console.log(chalk7.gray(" Project:"), chalk7.white(project.name));
|
|
1509
1517
|
console.log(chalk7.gray(" Namespace:"), chalk7.cyan(namespace));
|
|
1510
1518
|
console.log(chalk7.gray(" Directory:"), chalk7.cyan(`${safeName}/`));
|
|
@@ -1524,7 +1532,7 @@ async function createCommand(projectName, options) {
|
|
|
1524
1532
|
}
|
|
1525
1533
|
console.log("");
|
|
1526
1534
|
console.log(chalk7.bold(" Templates"));
|
|
1527
|
-
console.log(chalk7.gray(
|
|
1535
|
+
console.log(chalk7.gray(divider));
|
|
1528
1536
|
if (backendTemplateId) {
|
|
1529
1537
|
console.log(chalk7.gray(" Backend:"), chalk7.cyan(backendTemplateId));
|
|
1530
1538
|
}
|
|
@@ -1534,7 +1542,7 @@ async function createCommand(projectName, options) {
|
|
|
1534
1542
|
if (backendEstimatedFiles.length > 0) {
|
|
1535
1543
|
console.log("");
|
|
1536
1544
|
console.log(chalk7.bold(` Backend Files (${backendTemplateId})`));
|
|
1537
|
-
console.log(chalk7.gray(
|
|
1545
|
+
console.log(chalk7.gray(divider));
|
|
1538
1546
|
const backendCategories = categorizeFilePaths(backendEstimatedFiles);
|
|
1539
1547
|
const backendMaxNameLength = Math.max(...backendCategories.map((c) => c.name.length), 8);
|
|
1540
1548
|
for (const category of backendCategories) {
|
|
@@ -1545,7 +1553,7 @@ async function createCommand(projectName, options) {
|
|
|
1545
1553
|
chalk7.cyan(`${countStr} files`)
|
|
1546
1554
|
);
|
|
1547
1555
|
}
|
|
1548
|
-
console.log(chalk7.gray(
|
|
1556
|
+
console.log(chalk7.gray(divider));
|
|
1549
1557
|
const subtotalPadding = " ".repeat(backendMaxNameLength - 8 + 2);
|
|
1550
1558
|
const subtotalStr = backendEstimatedFiles.length.toString().padStart(3, " ");
|
|
1551
1559
|
console.log(
|
|
@@ -1556,7 +1564,7 @@ async function createCommand(projectName, options) {
|
|
|
1556
1564
|
if (frontendEstimatedFiles.length > 0) {
|
|
1557
1565
|
console.log("");
|
|
1558
1566
|
console.log(chalk7.bold(` Frontend Files (${frontendTemplateId})`));
|
|
1559
|
-
console.log(chalk7.gray(
|
|
1567
|
+
console.log(chalk7.gray(divider));
|
|
1560
1568
|
const frontendCategories = categorizeFilePaths(frontendEstimatedFiles);
|
|
1561
1569
|
const frontendMaxNameLength = Math.max(...frontendCategories.map((c) => c.name.length), 8);
|
|
1562
1570
|
for (const category of frontendCategories) {
|
|
@@ -1567,7 +1575,7 @@ async function createCommand(projectName, options) {
|
|
|
1567
1575
|
chalk7.cyan(`${countStr} files`)
|
|
1568
1576
|
);
|
|
1569
1577
|
}
|
|
1570
|
-
console.log(chalk7.gray(
|
|
1578
|
+
console.log(chalk7.gray(divider));
|
|
1571
1579
|
const subtotalPadding = " ".repeat(frontendMaxNameLength - 8 + 2);
|
|
1572
1580
|
const subtotalStr = frontendEstimatedFiles.length.toString().padStart(3, " ");
|
|
1573
1581
|
console.log(
|
|
@@ -1577,7 +1585,7 @@ async function createCommand(projectName, options) {
|
|
|
1577
1585
|
}
|
|
1578
1586
|
if (backendEstimatedFiles.length > 0 && frontendEstimatedFiles.length > 0) {
|
|
1579
1587
|
console.log("");
|
|
1580
|
-
console.log(chalk7.gray(
|
|
1588
|
+
console.log(chalk7.gray(divider));
|
|
1581
1589
|
console.log(
|
|
1582
1590
|
chalk7.bold.white(" TOTAL "),
|
|
1583
1591
|
chalk7.bold.green(`${totalEstimatedFiles.toString().padStart(3, " ")} files`)
|
|
@@ -1588,7 +1596,7 @@ async function createCommand(projectName, options) {
|
|
|
1588
1596
|
}
|
|
1589
1597
|
console.log("");
|
|
1590
1598
|
console.log(chalk7.bold(" Credits"));
|
|
1591
|
-
console.log(chalk7.gray(
|
|
1599
|
+
console.log(chalk7.gray(divider));
|
|
1592
1600
|
if (backendEstimatedCredits > 0) {
|
|
1593
1601
|
console.log(
|
|
1594
1602
|
chalk7.gray(" Backend:"),
|
|
@@ -1613,7 +1621,7 @@ async function createCommand(projectName, options) {
|
|
|
1613
1621
|
);
|
|
1614
1622
|
console.log("");
|
|
1615
1623
|
if (!hasEnoughCredits) {
|
|
1616
|
-
console.log(chalk7.red("
|
|
1624
|
+
console.log(chalk7.red(" ! Not enough credits for this generation."));
|
|
1617
1625
|
console.log(chalk7.gray(` Need ${totalEstimatedCredits - creditsRemaining} more credits.
|
|
1618
1626
|
`));
|
|
1619
1627
|
process.exit(1);
|
|
@@ -1715,15 +1723,15 @@ async function createCommand(projectName, options) {
|
|
|
1715
1723
|
const syncResult = await syncToCloud(apiClient, projectId, manifest);
|
|
1716
1724
|
if (syncResult.success) {
|
|
1717
1725
|
console.log(
|
|
1718
|
-
chalk7.gray("
|
|
1726
|
+
chalk7.gray(" OK Manifest synced to cloud") + chalk7.gray(` (${syncResult.fileCount} files)`)
|
|
1719
1727
|
);
|
|
1720
1728
|
}
|
|
1721
1729
|
} catch {
|
|
1722
|
-
console.log(chalk7.yellow("
|
|
1730
|
+
console.log(chalk7.yellow(" ! Could not sync manifest to cloud"));
|
|
1723
1731
|
}
|
|
1724
1732
|
console.log("");
|
|
1725
1733
|
console.log(chalk7.bold(" Project Created Successfully!"));
|
|
1726
|
-
console.log(chalk7.gray(
|
|
1734
|
+
console.log(chalk7.gray(divider));
|
|
1727
1735
|
console.log(chalk7.gray(" Directory:"), chalk7.cyan(safeName + "/"));
|
|
1728
1736
|
const backendFileCount = allGeneratedFiles.filter((f) => f.path.startsWith("backend/")).length;
|
|
1729
1737
|
const frontendFileCount = allGeneratedFiles.filter((f) => f.path.startsWith("frontend/")).length;
|
|
@@ -1857,59 +1865,124 @@ async function updateCommand(options) {
|
|
|
1857
1865
|
projectSpinner.start("Fetching project details...");
|
|
1858
1866
|
const project = await apiClient.getProject(config.projectId);
|
|
1859
1867
|
projectSpinner.stop(`Project: ${project.name}`);
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1868
|
+
const divider = ` ${"-".repeat(33)}`;
|
|
1869
|
+
const hasBackend = !!project.backendFramework;
|
|
1870
|
+
const hasFrontend = !!project.frontendFramework;
|
|
1871
|
+
let backendTemplateId = config.backendTemplateId;
|
|
1872
|
+
let frontendTemplateId = config.frontendTemplateId;
|
|
1873
|
+
if (!backendTemplateId && !frontendTemplateId) {
|
|
1874
|
+
if (hasBackend) {
|
|
1875
|
+
backendTemplateId = config.templateId;
|
|
1876
|
+
} else if (hasFrontend) {
|
|
1877
|
+
frontendTemplateId = config.templateId;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
if (!backendTemplateId && !frontendTemplateId) {
|
|
1881
|
+
p2.cancel("No templates configured for this project.");
|
|
1882
|
+
process.exit(1);
|
|
1883
|
+
}
|
|
1884
|
+
const backendOutput = config.output?.backend || "./backend";
|
|
1885
|
+
const frontendOutput = config.output?.frontend || "./frontend";
|
|
1886
|
+
const featureFlags = {
|
|
1887
|
+
includeDtos: true,
|
|
1888
|
+
includeUseCases: true,
|
|
1889
|
+
includeMappers: true,
|
|
1890
|
+
includeControllers: true,
|
|
1891
|
+
includeEfConfig: true,
|
|
1892
|
+
includeValidation: true,
|
|
1893
|
+
includeDtoValidation: true,
|
|
1894
|
+
includeUnitTests: true,
|
|
1895
|
+
includeIntegrationTests: true,
|
|
1896
|
+
includeStarterFiles: false,
|
|
1897
|
+
// Don't regenerate starter files on update
|
|
1898
|
+
includeReactions: true,
|
|
1899
|
+
includeOutbox: true,
|
|
1900
|
+
includeInbox: true
|
|
1901
|
+
};
|
|
1902
|
+
console.log("");
|
|
1903
|
+
console.log(chalk8.bold(" Update Configuration"));
|
|
1904
|
+
console.log(chalk8.gray(divider));
|
|
1905
|
+
console.log(chalk8.gray(" Project:"), chalk8.white(project.name));
|
|
1906
|
+
console.log(chalk8.gray(" Namespace:"), chalk8.cyan(config.namespace));
|
|
1907
|
+
if (backendTemplateId) {
|
|
1908
|
+
console.log(chalk8.gray(" Backend:"), chalk8.cyan(backendTemplateId));
|
|
1909
|
+
console.log(chalk8.gray(" Output:"), chalk8.cyan(backendOutput));
|
|
1910
|
+
}
|
|
1911
|
+
if (frontendTemplateId) {
|
|
1912
|
+
console.log(chalk8.gray(" Frontend:"), chalk8.cyan(frontendTemplateId));
|
|
1913
|
+
console.log(chalk8.gray(" Output:"), chalk8.cyan(frontendOutput));
|
|
1914
|
+
}
|
|
1865
1915
|
if (options.dryRun) {
|
|
1866
|
-
|
|
1916
|
+
console.log(chalk8.yellow(" Mode: DRY RUN (no files will be written)"));
|
|
1867
1917
|
}
|
|
1868
1918
|
if (options.force) {
|
|
1869
|
-
|
|
1919
|
+
console.log(chalk8.yellow(" Mode: FORCE (will overwrite modified files)"));
|
|
1870
1920
|
}
|
|
1871
|
-
let
|
|
1921
|
+
let backendEstimatedCredits = 0;
|
|
1922
|
+
let frontendEstimatedCredits = 0;
|
|
1872
1923
|
let creditsRemaining = 0;
|
|
1873
1924
|
const estimateSpinner = p2.spinner();
|
|
1874
1925
|
estimateSpinner.start("Calculating credit cost...");
|
|
1875
1926
|
try {
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1927
|
+
if (backendTemplateId) {
|
|
1928
|
+
const backendEstimate = await apiClient.estimateCreditCost({
|
|
1929
|
+
projectId: config.projectId,
|
|
1930
|
+
templateId: backendTemplateId,
|
|
1931
|
+
options: {
|
|
1932
|
+
featureFlags,
|
|
1933
|
+
useContexts: true
|
|
1934
|
+
}
|
|
1935
|
+
});
|
|
1936
|
+
backendEstimatedCredits = backendEstimate.estimatedCredits;
|
|
1937
|
+
}
|
|
1938
|
+
if (frontendTemplateId) {
|
|
1939
|
+
const frontendEstimate = await apiClient.estimateCreditCost({
|
|
1940
|
+
projectId: config.projectId,
|
|
1941
|
+
templateId: frontendTemplateId,
|
|
1942
|
+
options: {
|
|
1943
|
+
featureFlags,
|
|
1944
|
+
useContexts: true
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
frontendEstimatedCredits = frontendEstimate.estimatedCredits;
|
|
1948
|
+
}
|
|
1896
1949
|
const creditUsage = await apiClient.getCreditUsage(project.organizationId);
|
|
1897
1950
|
creditsRemaining = creditUsage.remaining;
|
|
1898
1951
|
estimateSpinner.stop("Credit estimate calculated");
|
|
1899
1952
|
} catch {
|
|
1900
1953
|
estimateSpinner.stop("Could not estimate credits (will be calculated on generation)");
|
|
1901
1954
|
}
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
}
|
|
1955
|
+
const totalEstimatedCredits = backendEstimatedCredits + frontendEstimatedCredits;
|
|
1956
|
+
const hasEnoughCredits = totalEstimatedCredits === 0 || creditsRemaining >= totalEstimatedCredits;
|
|
1957
|
+
console.log("");
|
|
1958
|
+
console.log(chalk8.bold(" Credits"));
|
|
1959
|
+
console.log(chalk8.gray(divider));
|
|
1960
|
+
if (backendEstimatedCredits > 0) {
|
|
1961
|
+
console.log(chalk8.gray(" Backend:"), chalk8.yellow(`${backendEstimatedCredits} credits`));
|
|
1962
|
+
}
|
|
1963
|
+
if (frontendEstimatedCredits > 0) {
|
|
1964
|
+
console.log(chalk8.gray(" Frontend:"), chalk8.yellow(`${frontendEstimatedCredits} credits`));
|
|
1965
|
+
}
|
|
1966
|
+
if (totalEstimatedCredits > 0) {
|
|
1967
|
+
console.log(
|
|
1968
|
+
chalk8.white(" Total Cost:"),
|
|
1969
|
+
hasEnoughCredits ? chalk8.bold.yellow(`${totalEstimatedCredits} credits`) : chalk8.bold.red(`${totalEstimatedCredits} credits`)
|
|
1970
|
+
);
|
|
1971
|
+
}
|
|
1972
|
+
console.log(
|
|
1973
|
+
chalk8.white(" Available:"),
|
|
1974
|
+
hasEnoughCredits ? chalk8.bold.green(`${creditsRemaining} credits`) : chalk8.bold.red(`${creditsRemaining} credits (insufficient)`)
|
|
1975
|
+
);
|
|
1976
|
+
console.log("");
|
|
1977
|
+
if (!hasEnoughCredits) {
|
|
1978
|
+
console.log(chalk8.red(" ! Not enough credits for this generation."));
|
|
1979
|
+
console.log(chalk8.gray(` Need ${totalEstimatedCredits - creditsRemaining} more credits.
|
|
1980
|
+
`));
|
|
1981
|
+
process.exit(1);
|
|
1909
1982
|
}
|
|
1910
1983
|
if (!options.dryRun) {
|
|
1911
1984
|
const proceed = await p2.confirm({
|
|
1912
|
-
message:
|
|
1985
|
+
message: totalEstimatedCredits > 0 ? `Proceed with update? (~${totalEstimatedCredits} credits)` : "Proceed with update?",
|
|
1913
1986
|
initialValue: true
|
|
1914
1987
|
});
|
|
1915
1988
|
if (p2.isCancel(proceed) || !proceed) {
|
|
@@ -1917,56 +1990,70 @@ async function updateCommand(options) {
|
|
|
1917
1990
|
process.exit(0);
|
|
1918
1991
|
}
|
|
1919
1992
|
}
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
useContexts: true
|
|
1993
|
+
const allGeneratedFiles = [];
|
|
1994
|
+
let totalCreditsUsed = 0;
|
|
1995
|
+
let totalCreditsRemaining = creditsRemaining;
|
|
1996
|
+
if (backendTemplateId) {
|
|
1997
|
+
const backendSpinner = ora3({ text: "Generating backend code...", color: "cyan" }).start();
|
|
1998
|
+
const backendResult = await apiClient.generateCode({
|
|
1999
|
+
projectId: config.projectId,
|
|
2000
|
+
templateId: backendTemplateId,
|
|
2001
|
+
options: {
|
|
2002
|
+
includeValidations: true,
|
|
2003
|
+
includeComments: true,
|
|
2004
|
+
featureFlags,
|
|
2005
|
+
useContexts: true
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
const backendFiles = (backendResult.files || []).map((file) => ({
|
|
2009
|
+
...file,
|
|
2010
|
+
path: `${backendOutput.replace(/^\.\//, "")}/${file.path}`
|
|
2011
|
+
}));
|
|
2012
|
+
allGeneratedFiles.push(...backendFiles);
|
|
2013
|
+
if (backendResult.creditsUsed !== void 0) {
|
|
2014
|
+
totalCreditsUsed += backendResult.creditsUsed;
|
|
2015
|
+
totalCreditsRemaining = backendResult.creditsRemaining ?? totalCreditsRemaining;
|
|
1944
2016
|
}
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
2017
|
+
backendSpinner.succeed(chalk8.green(`Backend: ${backendFiles.length} files generated`));
|
|
2018
|
+
}
|
|
2019
|
+
if (frontendTemplateId) {
|
|
2020
|
+
const frontendSpinner = ora3({ text: "Generating frontend code...", color: "cyan" }).start();
|
|
2021
|
+
const frontendResult = await apiClient.generateCode({
|
|
2022
|
+
projectId: config.projectId,
|
|
2023
|
+
templateId: frontendTemplateId,
|
|
2024
|
+
options: {
|
|
2025
|
+
includeValidations: true,
|
|
2026
|
+
includeComments: true,
|
|
2027
|
+
featureFlags,
|
|
2028
|
+
useContexts: true
|
|
2029
|
+
}
|
|
2030
|
+
});
|
|
2031
|
+
const frontendFiles = (frontendResult.files || []).map((file) => ({
|
|
2032
|
+
...file,
|
|
2033
|
+
path: `${frontendOutput.replace(/^\.\//, "")}/${file.path}`
|
|
2034
|
+
}));
|
|
2035
|
+
allGeneratedFiles.push(...frontendFiles);
|
|
2036
|
+
if (frontendResult.creditsUsed !== void 0) {
|
|
2037
|
+
totalCreditsUsed += frontendResult.creditsUsed;
|
|
2038
|
+
totalCreditsRemaining = frontendResult.creditsRemaining ?? totalCreditsRemaining;
|
|
2039
|
+
}
|
|
2040
|
+
frontendSpinner.succeed(chalk8.green(`Frontend: ${frontendFiles.length} files generated`));
|
|
2041
|
+
}
|
|
1949
2042
|
if (options.dryRun) {
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
2043
|
+
console.log("");
|
|
2044
|
+
console.log(chalk8.bold(" Dry Run Results:"));
|
|
2045
|
+
console.log(chalk8.gray(divider));
|
|
2046
|
+
console.log(` Files to process: ${allGeneratedFiles.length}`);
|
|
2047
|
+
console.log(` Tracked files: ${fileCount}`);
|
|
2048
|
+
console.log("");
|
|
2049
|
+
console.log(chalk8.gray(" Run without --dry-run to apply changes."));
|
|
1957
2050
|
p2.outro(chalk8.green("Dry run complete!"));
|
|
1958
2051
|
return;
|
|
1959
2052
|
}
|
|
1960
2053
|
const updateSpinner = p2.spinner();
|
|
1961
2054
|
updateSpinner.start("Applying updates...");
|
|
1962
|
-
const organizedFiles = result.files.map(
|
|
1963
|
-
(file) => ({
|
|
1964
|
-
...file,
|
|
1965
|
-
path: `${config.output.backend.replace(/^\.\//, "")}/${file.path}`
|
|
1966
|
-
})
|
|
1967
|
-
);
|
|
1968
2055
|
const writeResult = await writeGeneratedFilesWithManifest(
|
|
1969
|
-
|
|
2056
|
+
allGeneratedFiles,
|
|
1970
2057
|
process.cwd(),
|
|
1971
2058
|
config.templateVersion || "1.0.0",
|
|
1972
2059
|
{
|
|
@@ -1975,13 +2062,10 @@ async function updateCommand(options) {
|
|
|
1975
2062
|
}
|
|
1976
2063
|
);
|
|
1977
2064
|
updateSpinner.stop("Update complete");
|
|
1978
|
-
if (
|
|
2065
|
+
if (totalCreditsUsed > 0) {
|
|
1979
2066
|
console.log("");
|
|
1980
|
-
console.log(chalk8.gray(" Credits used:"), chalk8.yellow(
|
|
1981
|
-
console.log(
|
|
1982
|
-
chalk8.gray(" Credits remaining:"),
|
|
1983
|
-
chalk8.green(result.creditsRemaining)
|
|
1984
|
-
);
|
|
2067
|
+
console.log(chalk8.gray(" Credits used:"), chalk8.yellow(totalCreditsUsed));
|
|
2068
|
+
console.log(chalk8.gray(" Credits remaining:"), chalk8.green(totalCreditsRemaining));
|
|
1985
2069
|
}
|
|
1986
2070
|
try {
|
|
1987
2071
|
const syncResult = await syncToCloud(
|