@atlashub/smartstack-cli 4.68.0 → 4.70.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.
|
@@ -1,95 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://atlashub.ch/schemas/claude-gitflow-config.json",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"release": "release: ",
|
|
77
|
-
"hotfix": "hotfix: ",
|
|
78
|
-
"chore": "chore: "
|
|
79
|
-
},
|
|
80
|
-
"hooks": {
|
|
81
|
-
"prePlan": null,
|
|
82
|
-
"postPlan": null,
|
|
83
|
-
"preExec": null,
|
|
84
|
-
"postExec": null,
|
|
85
|
-
"preCommit": null,
|
|
86
|
-
"postCommit": null
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"ui": {
|
|
90
|
-
"colors": true,
|
|
91
|
-
"showProgress": true,
|
|
92
|
-
"compactMode": false,
|
|
93
|
-
"language": "fr"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://atlashub.ch/schemas/claude-gitflow-config.json",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"platform": {
|
|
5
|
+
"detected": "",
|
|
6
|
+
"shell": "",
|
|
7
|
+
"detectedAt": ""
|
|
8
|
+
},
|
|
9
|
+
"workspace": {
|
|
10
|
+
"path": "",
|
|
11
|
+
"name": ""
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"name": "",
|
|
15
|
+
"rootFolder": "",
|
|
16
|
+
"nameVariants": {
|
|
17
|
+
"pascalCaseDot": "",
|
|
18
|
+
"pascalCase": "",
|
|
19
|
+
"kebabCase": "",
|
|
20
|
+
"snakeCase": "",
|
|
21
|
+
"displayName": ""
|
|
22
|
+
},
|
|
23
|
+
"defaultBranch": "main",
|
|
24
|
+
"remoteUrl": ""
|
|
25
|
+
},
|
|
26
|
+
"git": {
|
|
27
|
+
"provider": "",
|
|
28
|
+
"branches": {
|
|
29
|
+
"main": "main",
|
|
30
|
+
"develop": "develop"
|
|
31
|
+
},
|
|
32
|
+
"prefixes": {
|
|
33
|
+
"feature": "feature/",
|
|
34
|
+
"release": "release/",
|
|
35
|
+
"hotfix": "hotfix/"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"worktrees": {
|
|
39
|
+
"enabled": true,
|
|
40
|
+
"mode": "organized",
|
|
41
|
+
"structure": {
|
|
42
|
+
"main": "",
|
|
43
|
+
"develop": "",
|
|
44
|
+
"features": "",
|
|
45
|
+
"releases": "",
|
|
46
|
+
"hotfixes": ""
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"versioning": {
|
|
50
|
+
"strategy": "semver",
|
|
51
|
+
"current": "0.0.0",
|
|
52
|
+
"tagPrefix": "v",
|
|
53
|
+
"sources": ["csproj", "package.json", "VERSION"]
|
|
54
|
+
},
|
|
55
|
+
"efcore": {
|
|
56
|
+
"enabled": true,
|
|
57
|
+
"validateOnCommit": true,
|
|
58
|
+
"blockDestructive": true,
|
|
59
|
+
"migrationNaming": "{context}_v{version}_{sequence}_{Description}",
|
|
60
|
+
"migrationNamingSquash": "{context}_v{version}",
|
|
61
|
+
"squashBeforePR": true
|
|
62
|
+
},
|
|
63
|
+
"workflow": {
|
|
64
|
+
"push": {
|
|
65
|
+
"afterCommit": "worktree"
|
|
66
|
+
},
|
|
67
|
+
"pr": {
|
|
68
|
+
"autoLabels": true,
|
|
69
|
+
"requireReview": true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"language": {
|
|
73
|
+
"code": "en"
|
|
74
|
+
}
|
|
75
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -112390,7 +112390,8 @@ async function readClaudeSettings() {
|
|
|
112390
112390
|
return null;
|
|
112391
112391
|
}
|
|
112392
112392
|
const raw = await import_fs_extra.default.readFile(settingsPath, "utf-8");
|
|
112393
|
-
|
|
112393
|
+
const cleaned = stripJsonComments(raw);
|
|
112394
|
+
return JSON.parse(cleaned);
|
|
112394
112395
|
} catch {
|
|
112395
112396
|
return null;
|
|
112396
112397
|
}
|
|
@@ -112424,7 +112425,11 @@ async function registerMcpInClaudeSettings(servers) {
|
|
|
112424
112425
|
try {
|
|
112425
112426
|
logger.debug(`Home directory: ${(0, import_os.homedir)()}`);
|
|
112426
112427
|
logger.debug(`Target settings path: ${settingsPath}`);
|
|
112427
|
-
const
|
|
112428
|
+
const existingSettings = await readClaudeSettings();
|
|
112429
|
+
if (existingSettings === null && await import_fs_extra.default.pathExists(settingsPath)) {
|
|
112430
|
+
return { success: false, path: settingsPath, error: "Cannot parse existing settings.json" };
|
|
112431
|
+
}
|
|
112432
|
+
const settings = existingSettings || {};
|
|
112428
112433
|
const mcpServers = settings["mcpServers"] || {};
|
|
112429
112434
|
for (const server of servers) {
|
|
112430
112435
|
mcpServers[server.name] = {
|
|
@@ -112482,7 +112487,12 @@ async function unregisterMcpFromClaudeSettings(serverNames) {
|
|
|
112482
112487
|
async function configureClaudeEnvironment() {
|
|
112483
112488
|
const settingsPath = getClaudeSettingsPath();
|
|
112484
112489
|
try {
|
|
112485
|
-
const
|
|
112490
|
+
const existingSettings = await readClaudeSettings();
|
|
112491
|
+
if (existingSettings === null && await import_fs_extra.default.pathExists(settingsPath)) {
|
|
112492
|
+
logger.warning("Cannot parse existing settings.json \u2014 skipping to avoid data loss");
|
|
112493
|
+
return { success: false, path: settingsPath, error: "Cannot parse existing settings.json" };
|
|
112494
|
+
}
|
|
112495
|
+
const settings = existingSettings || {};
|
|
112486
112496
|
const env2 = settings["env"] || {};
|
|
112487
112497
|
let changed = false;
|
|
112488
112498
|
if (env2["CLAUDE_CODE_MAX_OUTPUT_TOKENS"] !== "64000") {
|
|
@@ -116869,7 +116879,9 @@ EndGlobal
|
|
|
116869
116879
|
"Microsoft.AspNetCore.Authentication.JwtBearer",
|
|
116870
116880
|
"Microsoft.EntityFrameworkCore.Design",
|
|
116871
116881
|
// Required for EF Core migrations
|
|
116872
|
-
"Swashbuckle.AspNetCore"
|
|
116882
|
+
"Swashbuckle.AspNetCore",
|
|
116883
|
+
"Microsoft.AspNetCore.SignalR.StackExchangeRedis"
|
|
116884
|
+
// SignalR Redis backplane (not transitive from SmartStack NuGet)
|
|
116873
116885
|
]
|
|
116874
116886
|
}
|
|
116875
116887
|
];
|
|
@@ -117877,7 +117889,7 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
117877
117889
|
]);
|
|
117878
117890
|
if (!continueWithoutMcp) {
|
|
117879
117891
|
logger.info("Install MCP servers and try again.");
|
|
117880
|
-
|
|
117892
|
+
return;
|
|
117881
117893
|
}
|
|
117882
117894
|
} else {
|
|
117883
117895
|
logger.warning("Continuing without MCP servers (--yes mode)");
|
|
@@ -117930,18 +117942,21 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
117930
117942
|
logger.error("Installation completed but .NET SDK still not detected.");
|
|
117931
117943
|
logger.info("You may need to restart your terminal, then run ss init again.");
|
|
117932
117944
|
showInstallHelp();
|
|
117933
|
-
process.
|
|
117945
|
+
process.exitCode = 1;
|
|
117946
|
+
return;
|
|
117934
117947
|
}
|
|
117935
117948
|
} catch {
|
|
117936
117949
|
logger.error("winget installation failed.");
|
|
117937
117950
|
showInstallHelp();
|
|
117938
|
-
process.
|
|
117951
|
+
process.exitCode = 1;
|
|
117952
|
+
return;
|
|
117939
117953
|
}
|
|
117940
117954
|
} else {
|
|
117941
117955
|
logger.info("");
|
|
117942
117956
|
logger.info(`Install manually: ${source_default.cyan(wingetCmd)}`);
|
|
117943
117957
|
showInstallHelp();
|
|
117944
|
-
process.
|
|
117958
|
+
process.exitCode = 1;
|
|
117959
|
+
return;
|
|
117945
117960
|
}
|
|
117946
117961
|
} else {
|
|
117947
117962
|
logger.info(`Installing .NET SDK ${MIN_DOTNET_MAJOR}.0 via winget...`);
|
|
@@ -117957,17 +117972,20 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
117957
117972
|
logger.error("Installation completed but .NET SDK still not detected.");
|
|
117958
117973
|
logger.info("Restart your terminal, then run ss init again.");
|
|
117959
117974
|
showInstallHelp();
|
|
117960
|
-
process.
|
|
117975
|
+
process.exitCode = 1;
|
|
117976
|
+
return;
|
|
117961
117977
|
}
|
|
117962
117978
|
} catch {
|
|
117963
117979
|
logger.error("Automatic installation failed.");
|
|
117964
117980
|
showInstallHelp();
|
|
117965
|
-
process.
|
|
117981
|
+
process.exitCode = 1;
|
|
117982
|
+
return;
|
|
117966
117983
|
}
|
|
117967
117984
|
}
|
|
117968
117985
|
} else {
|
|
117969
117986
|
showInstallHelp();
|
|
117970
|
-
process.
|
|
117987
|
+
process.exitCode = 1;
|
|
117988
|
+
return;
|
|
117971
117989
|
}
|
|
117972
117990
|
} else {
|
|
117973
117991
|
logger.success(`.NET SDK ${prereqs.dotnetVersion} detected`);
|
|
@@ -117981,7 +117999,8 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
117981
117999
|
const inPlaceResult = await validateInPlaceDirectory(projectDir);
|
|
117982
118000
|
if (inPlaceResult.error) {
|
|
117983
118001
|
logger.error(inPlaceResult.error);
|
|
117984
|
-
process.
|
|
118002
|
+
process.exitCode = 1;
|
|
118003
|
+
return;
|
|
117985
118004
|
}
|
|
117986
118005
|
if (inPlaceResult.isResume) {
|
|
117987
118006
|
resumeState = inPlaceResult.existingState;
|
|
@@ -117997,7 +118016,7 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
117997
118016
|
]);
|
|
117998
118017
|
if (!confirmResume) {
|
|
117999
118018
|
logger.info("Cancelled by user.");
|
|
118000
|
-
|
|
118019
|
+
return;
|
|
118001
118020
|
}
|
|
118002
118021
|
}
|
|
118003
118022
|
} else {
|
|
@@ -118012,7 +118031,7 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
118012
118031
|
]);
|
|
118013
118032
|
if (!confirm) {
|
|
118014
118033
|
logger.info("Cancelled by user.");
|
|
118015
|
-
|
|
118034
|
+
return;
|
|
118016
118035
|
}
|
|
118017
118036
|
}
|
|
118018
118037
|
}
|
|
@@ -118020,7 +118039,8 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
118020
118039
|
if (await import_fs_extra6.default.pathExists(projectDir)) {
|
|
118021
118040
|
logger.error(`Directory '${projectDir}' already exists.`);
|
|
118022
118041
|
logger.info(`Tip: Use ${source_default.cyan("--here")} to initialize in the current directory instead.`);
|
|
118023
|
-
process.
|
|
118042
|
+
process.exitCode = 1;
|
|
118043
|
+
return;
|
|
118024
118044
|
}
|
|
118025
118045
|
}
|
|
118026
118046
|
let finalProjectName = projectName;
|
|
@@ -118043,14 +118063,16 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
118043
118063
|
} else {
|
|
118044
118064
|
logger.error(`Cannot continue with invalid project name.`);
|
|
118045
118065
|
logger.info(`Tip: Rename folder to use only letters, digits, and underscores.`);
|
|
118046
|
-
process.
|
|
118066
|
+
process.exitCode = 1;
|
|
118067
|
+
return;
|
|
118047
118068
|
}
|
|
118048
118069
|
} else if (validation.suggestion && options.yes) {
|
|
118049
118070
|
finalProjectName = validation.suggestion;
|
|
118050
118071
|
logger.info(`Auto-converted to "${finalProjectName}" for C# compatibility`);
|
|
118051
118072
|
} else {
|
|
118052
118073
|
logger.error(`Invalid project name: ${validation.error}`);
|
|
118053
|
-
process.
|
|
118074
|
+
process.exitCode = 1;
|
|
118075
|
+
return;
|
|
118054
118076
|
}
|
|
118055
118077
|
}
|
|
118056
118078
|
if (!inPlace && finalProjectName !== projectName) {
|
|
@@ -118059,7 +118081,8 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
118059
118081
|
logger.info(`Project directory updated to: ${source_default.cyan(finalProjectDir)}`);
|
|
118060
118082
|
if (await import_fs_extra6.default.pathExists(finalProjectDir)) {
|
|
118061
118083
|
logger.error(`Directory '${finalProjectDir}' already exists.`);
|
|
118062
|
-
process.
|
|
118084
|
+
process.exitCode = 1;
|
|
118085
|
+
return;
|
|
118063
118086
|
}
|
|
118064
118087
|
}
|
|
118065
118088
|
let config;
|
|
@@ -118220,7 +118243,8 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
118220
118243
|
console.log();
|
|
118221
118244
|
logger.info(`Fix the issue and re-run: ${source_default.cyan("ss init --here")}`);
|
|
118222
118245
|
logger.info("Your progress has been saved and will be resumed automatically.");
|
|
118223
|
-
process.
|
|
118246
|
+
process.exitCode = 1;
|
|
118247
|
+
return;
|
|
118224
118248
|
}
|
|
118225
118249
|
});
|
|
118226
118250
|
|
|
@@ -124987,6 +125011,32 @@ function isPlainObject(value) {
|
|
|
124987
125011
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
124988
125012
|
}
|
|
124989
125013
|
|
|
125014
|
+
// src/lib/required-packages.ts
|
|
125015
|
+
var REQUIRED_PACKAGES = [
|
|
125016
|
+
{
|
|
125017
|
+
suffix: "Domain",
|
|
125018
|
+
packages: []
|
|
125019
|
+
},
|
|
125020
|
+
{
|
|
125021
|
+
suffix: "Infrastructure",
|
|
125022
|
+
packages: [
|
|
125023
|
+
"Microsoft.EntityFrameworkCore",
|
|
125024
|
+
"Microsoft.EntityFrameworkCore.Design",
|
|
125025
|
+
"Microsoft.EntityFrameworkCore.SqlServer"
|
|
125026
|
+
]
|
|
125027
|
+
},
|
|
125028
|
+
{
|
|
125029
|
+
suffix: "Api",
|
|
125030
|
+
packages: [
|
|
125031
|
+
"Microsoft.AspNetCore.OpenApi",
|
|
125032
|
+
"Microsoft.AspNetCore.Authentication.JwtBearer",
|
|
125033
|
+
"Microsoft.EntityFrameworkCore.Design",
|
|
125034
|
+
"Swashbuckle.AspNetCore",
|
|
125035
|
+
"Microsoft.AspNetCore.SignalR.StackExchangeRedis"
|
|
125036
|
+
]
|
|
125037
|
+
}
|
|
125038
|
+
];
|
|
125039
|
+
|
|
124990
125040
|
// src/commands/upgrade.ts
|
|
124991
125041
|
var TEMPLATES_DIR3 = (0, import_path8.join)((0, import_path8.dirname)(__dirname), "templates", "project");
|
|
124992
125042
|
async function getLatestNuGetVersion2(packageName, prerelease) {
|
|
@@ -125429,6 +125479,41 @@ async function syncDockerFiles(projectDir, baseNamespace, dryRun) {
|
|
|
125429
125479
|
}
|
|
125430
125480
|
return updated;
|
|
125431
125481
|
}
|
|
125482
|
+
async function ensureRequiredPackages(projects, baseNamespace, dryRun) {
|
|
125483
|
+
const added = [];
|
|
125484
|
+
const failed = [];
|
|
125485
|
+
for (const rp of REQUIRED_PACKAGES) {
|
|
125486
|
+
if (rp.packages.length === 0) continue;
|
|
125487
|
+
const expectedFolder = `${baseNamespace}.${rp.suffix}`;
|
|
125488
|
+
const project = projects.find((p) => {
|
|
125489
|
+
const folderName = p.relPath.split(/[/\\]/).slice(-2, -1)[0];
|
|
125490
|
+
return folderName === expectedFolder;
|
|
125491
|
+
});
|
|
125492
|
+
if (!project) continue;
|
|
125493
|
+
const currentPackages = readAllPackageReferences(project.csprojContent);
|
|
125494
|
+
const currentNames = new Set(currentPackages.map((p) => p.name.toLowerCase()));
|
|
125495
|
+
for (const requiredPkg of rp.packages) {
|
|
125496
|
+
if (currentNames.has(requiredPkg.toLowerCase())) continue;
|
|
125497
|
+
try {
|
|
125498
|
+
if (dryRun) {
|
|
125499
|
+
logger.info(` [DRY RUN] Would add ${source_default.cyan(requiredPkg)} to ${source_default.cyan(expectedFolder)}`);
|
|
125500
|
+
} else {
|
|
125501
|
+
execCommand2(
|
|
125502
|
+
`dotnet add "${project.csprojPath}" package ${requiredPkg} --no-restore`,
|
|
125503
|
+
void 0,
|
|
125504
|
+
false
|
|
125505
|
+
);
|
|
125506
|
+
logger.success(` ${source_default.green("+")} Added ${source_default.cyan(requiredPkg)} to ${source_default.cyan(expectedFolder)}`);
|
|
125507
|
+
}
|
|
125508
|
+
added.push(`${expectedFolder} + ${requiredPkg}`);
|
|
125509
|
+
} catch {
|
|
125510
|
+
failed.push(`${expectedFolder} + ${requiredPkg}`);
|
|
125511
|
+
logger.error(` ${source_default.red("\u2717")} Failed to add ${requiredPkg} to ${expectedFolder}`);
|
|
125512
|
+
}
|
|
125513
|
+
}
|
|
125514
|
+
}
|
|
125515
|
+
return { added, failed };
|
|
125516
|
+
}
|
|
125432
125517
|
var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack packages to the latest version").option("--preview", "Upgrade to latest preview/prerelease version").option("--dry-run", "Show what would be upgraded without actually upgrading").option("--all-packages", "Also upgrade all other NuGet packages (slow, disabled by default)").action(async (options) => {
|
|
125433
125518
|
logger.header("SmartStack Package Upgrade");
|
|
125434
125519
|
const dryRun = options.dryRun || false;
|
|
@@ -125450,6 +125535,7 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
|
|
|
125450
125535
|
testFrontendSynced: 0,
|
|
125451
125536
|
residualsCleaned: 0,
|
|
125452
125537
|
initStateFixed: false,
|
|
125538
|
+
requiredPkgAdded: 0,
|
|
125453
125539
|
programCsIssues: []
|
|
125454
125540
|
};
|
|
125455
125541
|
if (dryRun) {
|
|
@@ -125460,7 +125546,8 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
|
|
|
125460
125546
|
if (!detection.isProject) {
|
|
125461
125547
|
logger.error("Not a SmartStack project. Run this command from a SmartStack project root.");
|
|
125462
125548
|
logger.info("Tip: SmartStack projects contain a .smartstack/config.json file.");
|
|
125463
|
-
process.
|
|
125549
|
+
process.exitCode = 1;
|
|
125550
|
+
return;
|
|
125464
125551
|
}
|
|
125465
125552
|
const { config, projectDir } = detection;
|
|
125466
125553
|
logger.info(`Project: ${source_default.cyan(config.baseNamespace)}`);
|
|
@@ -125476,7 +125563,8 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
|
|
|
125476
125563
|
const npmVersion = await getLatestNpmVersion("@atlashub/smartstack", usePreview);
|
|
125477
125564
|
if (!nugetVersion) {
|
|
125478
125565
|
logger.error("Could not fetch latest NuGet version. Check your internet connection.");
|
|
125479
|
-
process.
|
|
125566
|
+
process.exitCode = 1;
|
|
125567
|
+
return;
|
|
125480
125568
|
}
|
|
125481
125569
|
logger.success(`Latest NuGet version: ${source_default.cyan(nugetVersion)}`);
|
|
125482
125570
|
if (npmVersion) {
|
|
@@ -125538,10 +125626,37 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
|
|
|
125538
125626
|
}
|
|
125539
125627
|
console.log();
|
|
125540
125628
|
}
|
|
125629
|
+
logger.info("Checking required NuGet packages...");
|
|
125630
|
+
if (result.nugetUpgraded > 0) {
|
|
125631
|
+
for (const project of allProjects) {
|
|
125632
|
+
if (project.currentVersion !== null) {
|
|
125633
|
+
project.csprojContent = await import_fs_extra7.default.readFile(project.csprojPath, "utf-8");
|
|
125634
|
+
}
|
|
125635
|
+
}
|
|
125636
|
+
}
|
|
125637
|
+
const requiredResult = await ensureRequiredPackages(
|
|
125638
|
+
allProjects,
|
|
125639
|
+
config.baseNamespace,
|
|
125640
|
+
dryRun
|
|
125641
|
+
);
|
|
125642
|
+
result.requiredPkgAdded = requiredResult.added.length;
|
|
125643
|
+
if (requiredResult.added.length > 0) {
|
|
125644
|
+
logger.success(`${requiredResult.added.length} required package(s) added`);
|
|
125645
|
+
if (!dryRun) {
|
|
125646
|
+
logger.info("Restoring NuGet packages...");
|
|
125647
|
+
tryExecCommand("dotnet restore", projectDir);
|
|
125648
|
+
}
|
|
125649
|
+
} else {
|
|
125650
|
+
logger.info(`Required packages ${source_default.green("\u2713")} all present`);
|
|
125651
|
+
}
|
|
125652
|
+
if (requiredResult.failed.length > 0) {
|
|
125653
|
+
logger.error(`${requiredResult.failed.length} required package(s) failed to add`);
|
|
125654
|
+
}
|
|
125655
|
+
console.log();
|
|
125541
125656
|
if (options.allPackages) {
|
|
125542
125657
|
logger.info("Checking other NuGet packages...");
|
|
125543
125658
|
for (const project of allProjects) {
|
|
125544
|
-
const content = result.nugetUpgraded > 0 && project.currentVersion !== null ? await import_fs_extra7.default.readFile(project.csprojPath, "utf-8") : project.csprojContent;
|
|
125659
|
+
const content = result.nugetUpgraded > 0 && project.currentVersion !== null || result.requiredPkgAdded > 0 ? await import_fs_extra7.default.readFile(project.csprojPath, "utf-8") : project.csprojContent;
|
|
125545
125660
|
const allPackages = readAllPackageReferences(content);
|
|
125546
125661
|
const otherPackages = allPackages.filter((p) => p.name !== "SmartStack");
|
|
125547
125662
|
if (otherPackages.length === 0) continue;
|
|
@@ -125765,7 +125880,7 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
|
|
|
125765
125880
|
logger.success(`Updated config version to ${source_default.cyan(nugetVersion)}`);
|
|
125766
125881
|
console.log();
|
|
125767
125882
|
}
|
|
125768
|
-
const totalChanged = result.nugetUpgraded + result.otherPkgUpdated + (result.npmUpgraded ? 1 : 0) + (result.npmOtherUpdated ? 1 : 0) + migrationSummary.totalApplied + result.configSynced + result.claudeSettingsSynced + result.dockerSynced + result.testFrontendSynced + result.residualsCleaned + (result.initStateFixed ? 1 : 0) + (result.ralphInitialized ? 1 : 0);
|
|
125883
|
+
const totalChanged = result.nugetUpgraded + result.requiredPkgAdded + result.otherPkgUpdated + (result.npmUpgraded ? 1 : 0) + (result.npmOtherUpdated ? 1 : 0) + migrationSummary.totalApplied + result.configSynced + result.claudeSettingsSynced + result.dockerSynced + result.testFrontendSynced + result.residualsCleaned + (result.initStateFixed ? 1 : 0) + (result.ralphInitialized ? 1 : 0);
|
|
125769
125884
|
const allUpToDate = totalChanged === 0 && result.nugetFailed === 0 && result.otherPkgFailed === 0;
|
|
125770
125885
|
const hasProgramIssues = result.programCsIssues.length > 0;
|
|
125771
125886
|
if (allUpToDate && !hasProgramIssues) {
|
|
@@ -125802,6 +125917,9 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
|
|
|
125802
125917
|
if (result.nugetFailed > 0) {
|
|
125803
125918
|
lines.push(` ${source_default.red("\u2717")} SmartStack: ${result.nugetFailed} project(s) failed`);
|
|
125804
125919
|
}
|
|
125920
|
+
if (result.requiredPkgAdded > 0) {
|
|
125921
|
+
lines.push(` ${source_default.green("\u2713")} Required packages: ${result.requiredPkgAdded} added`);
|
|
125922
|
+
}
|
|
125805
125923
|
if (result.otherPkgUpdated > 0) {
|
|
125806
125924
|
lines.push(` ${source_default.green("\u2713")} Other NuGet: ${result.otherPkgUpdated} package(s) updated`);
|
|
125807
125925
|
}
|
|
@@ -127663,11 +127781,19 @@ var doctorCommand = new Command("doctor").description("Run diagnostics and check
|
|
|
127663
127781
|
});
|
|
127664
127782
|
} else if (containerEngine && !containerEngine.running) {
|
|
127665
127783
|
const isPodman = containerEngine.name === "Podman";
|
|
127784
|
+
const wslMissing = isPodman && process.platform === "win32" && (() => {
|
|
127785
|
+
try {
|
|
127786
|
+
return (0, import_child_process8.execSync)("wsl --status", { encoding: "utf-8", timeout: 5e3, stdio: "pipe" }) && false;
|
|
127787
|
+
} catch {
|
|
127788
|
+
return true;
|
|
127789
|
+
}
|
|
127790
|
+
})();
|
|
127666
127791
|
diagnostics.push({
|
|
127667
127792
|
name: "Container Engine",
|
|
127668
127793
|
status: "warning",
|
|
127669
|
-
message: `${containerEngine.name} installed but ${isPodman ? "machine" : "daemon"} not running`,
|
|
127670
|
-
fix: isPodman ? "Run: podman machine init && podman machine start" : "Start Docker Desktop, or run: podman machine init && podman machine start"
|
|
127794
|
+
message: wslMissing ? "Podman installed but WSL2 is missing" : `${containerEngine.name} installed but ${isPodman ? "machine" : "daemon"} not running`,
|
|
127795
|
+
fix: wslMissing ? "Run as Admin: wsl --install, restart PC, then: podman machine init && podman machine start" : isPodman ? "Run: podman machine init && podman machine start" : "Start Docker Desktop, or run: podman machine init && podman machine start",
|
|
127796
|
+
installCmd: wslMissing ? process.platform === "win32" ? "wsl --install" : void 0 : void 0
|
|
127671
127797
|
});
|
|
127672
127798
|
} else {
|
|
127673
127799
|
diagnostics.push({
|
|
@@ -130198,11 +130324,29 @@ function detectEngine() {
|
|
|
130198
130324
|
return podman;
|
|
130199
130325
|
}
|
|
130200
130326
|
if (podman.installed && !podman.running) {
|
|
130201
|
-
|
|
130202
|
-
|
|
130203
|
-
|
|
130204
|
-
|
|
130205
|
-
|
|
130327
|
+
const wslMissing = process.platform === "win32" && (() => {
|
|
130328
|
+
try {
|
|
130329
|
+
const r = (0, import_child_process12.spawnSync)("wsl", ["--status"], { encoding: "utf-8", shell: true, timeout: 5e3, stdio: "pipe" });
|
|
130330
|
+
return r.status !== 0;
|
|
130331
|
+
} catch {
|
|
130332
|
+
return true;
|
|
130333
|
+
}
|
|
130334
|
+
})();
|
|
130335
|
+
if (wslMissing) {
|
|
130336
|
+
logger.error("WSL2 is required by Podman but is not installed.");
|
|
130337
|
+
console.log();
|
|
130338
|
+
console.log(` Install WSL2 first (run as Administrator):`);
|
|
130339
|
+
console.log(` ${source_default.cyan("wsl --install")}`);
|
|
130340
|
+
console.log(` Restart your PC, then:`);
|
|
130341
|
+
console.log(` ${source_default.cyan("podman machine init")}`);
|
|
130342
|
+
console.log(` ${source_default.cyan("podman machine start")}`);
|
|
130343
|
+
} else {
|
|
130344
|
+
logger.error("Podman is installed but the machine is not running.");
|
|
130345
|
+
console.log();
|
|
130346
|
+
console.log(` Initialize and start the Podman machine:`);
|
|
130347
|
+
console.log(` ${source_default.cyan("podman machine init")} (first time only)`);
|
|
130348
|
+
console.log(` ${source_default.cyan("podman machine start")}`);
|
|
130349
|
+
}
|
|
130206
130350
|
if (docker.installed) {
|
|
130207
130351
|
console.log();
|
|
130208
130352
|
console.log(` Or start Docker Desktop instead.`);
|
|
@@ -130432,7 +130576,8 @@ async function main2() {
|
|
|
130432
130576
|
\u2551 \u2551
|
|
130433
130577
|
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
130434
130578
|
`));
|
|
130435
|
-
process.
|
|
130579
|
+
process.exitCode = 1;
|
|
130580
|
+
return;
|
|
130436
130581
|
}
|
|
130437
130582
|
if (result.warnings?.length) {
|
|
130438
130583
|
for (const warning of result.warnings) {
|