@atlashub/smartstack-cli 1.28.0 → 1.30.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.
- package/.documentation/installation.html +31 -4
- package/dist/index.js +43 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -764,13 +764,25 @@ claude mcp add smartstack -- smartstack-mcp</code></pre>
|
|
|
764
764
|
<p data-lang="fr">Installez le serveur MCP Context7 pour acceder a la documentation des bibliotheques.</p>
|
|
765
765
|
<p data-lang="en">Install the Context7 MCP server to access library documentation.</p>
|
|
766
766
|
|
|
767
|
-
<p data-lang="fr">Obtenez une cle API sur <a href="https://context7.com" target="_blank">context7.com</a>, puis
|
|
768
|
-
<p data-lang="en">Get an API key at <a href="https://context7.com" target="_blank">context7.com</a>, then
|
|
767
|
+
<p data-lang="fr">Obtenez une cle API sur <a href="https://context7.com" target="_blank">context7.com</a>, puis entrez-la ci-dessous :</p>
|
|
768
|
+
<p data-lang="en">Get an API key at <a href="https://context7.com" target="_blank">context7.com</a>, then enter it below:</p>
|
|
769
|
+
|
|
770
|
+
<div class="api-key-input" style="margin: 1rem 0;">
|
|
771
|
+
<label style="display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--text);">
|
|
772
|
+
<span data-lang="fr">Votre cle API Context7 :</span>
|
|
773
|
+
<span data-lang="en">Your Context7 API key:</span>
|
|
774
|
+
</label>
|
|
775
|
+
<input type="text"
|
|
776
|
+
id="context7-api-key"
|
|
777
|
+
placeholder="ctx7_xxxxxxxxxxxxxxxx"
|
|
778
|
+
style="width: 100%; max-width: 400px; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text); font-family: monospace; font-size: 0.9rem;"
|
|
779
|
+
oninput="updateContext7Commands()">
|
|
780
|
+
</div>
|
|
769
781
|
|
|
770
782
|
<div class="code-block">
|
|
771
783
|
<button class="copy-btn">Copy</button>
|
|
772
|
-
<pre><code># 1. Definir la cle API
|
|
773
|
-
$env:CONTEXT7_API_KEY = "votre-cle-api"
|
|
784
|
+
<pre><code id="context7-commands"># 1. Definir la cle API
|
|
785
|
+
$env:CONTEXT7_API_KEY = "<span class="context7-key-placeholder" style="color: var(--text-muted);">votre-cle-api</span>"
|
|
774
786
|
|
|
775
787
|
# 2. Installer le package
|
|
776
788
|
npm install -g @upstash/context7-mcp
|
|
@@ -1442,6 +1454,21 @@ smartstack init</code></pre>
|
|
|
1442
1454
|
}
|
|
1443
1455
|
}
|
|
1444
1456
|
|
|
1457
|
+
// Context7 API key dynamic update
|
|
1458
|
+
function updateContext7Commands() {
|
|
1459
|
+
var input = document.getElementById('context7-api-key');
|
|
1460
|
+
var placeholder = document.querySelector('.context7-key-placeholder');
|
|
1461
|
+
var value = input.value.trim();
|
|
1462
|
+
|
|
1463
|
+
if (value) {
|
|
1464
|
+
placeholder.textContent = value;
|
|
1465
|
+
placeholder.style.color = 'var(--success)';
|
|
1466
|
+
} else {
|
|
1467
|
+
placeholder.textContent = 'votre-cle-api';
|
|
1468
|
+
placeholder.style.color = 'var(--text-muted)';
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1445
1472
|
</script>
|
|
1446
1473
|
</body>
|
|
1447
1474
|
</html>
|
package/dist/index.js
CHANGED
|
@@ -115853,6 +115853,17 @@ EndGlobal
|
|
|
115853
115853
|
}
|
|
115854
115854
|
}
|
|
115855
115855
|
}
|
|
115856
|
+
if (!dryRun) {
|
|
115857
|
+
for (const { proj } of projects) {
|
|
115858
|
+
const csprojPath = (0, import_path4.join)(srcDir, proj, `${proj}.csproj`);
|
|
115859
|
+
if (await import_fs_extra3.default.pathExists(csprojPath)) {
|
|
115860
|
+
let content = await import_fs_extra3.default.readFile(csprojPath, "utf-8");
|
|
115861
|
+
content = content.replace(/\s*<TargetFramework>.*<\/TargetFramework>\s*/g, "\n ");
|
|
115862
|
+
await import_fs_extra3.default.writeFile(csprojPath, content);
|
|
115863
|
+
}
|
|
115864
|
+
}
|
|
115865
|
+
logger.info("Configured projects to inherit TargetFramework from Directory.Build.props");
|
|
115866
|
+
}
|
|
115856
115867
|
const refs = [
|
|
115857
115868
|
{ from: `${projectName}.Application`, to: `${projectName}.Domain` },
|
|
115858
115869
|
{ from: `${projectName}.Infrastructure`, to: `${projectName}.Domain` },
|
|
@@ -115972,9 +115983,10 @@ async function createConfigFiles(config, dryRun) {
|
|
|
115972
115983
|
logger.info("[DRY RUN] Would create configuration files");
|
|
115973
115984
|
return;
|
|
115974
115985
|
}
|
|
115986
|
+
const targetFramework = config.preview ? "net10.0" : "net9.0";
|
|
115975
115987
|
const buildProps = `<Project>
|
|
115976
115988
|
<PropertyGroup>
|
|
115977
|
-
<TargetFramework
|
|
115989
|
+
<TargetFramework>${targetFramework}</TargetFramework>
|
|
115978
115990
|
<Nullable>enable</Nullable>
|
|
115979
115991
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
115980
115992
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
@@ -115982,6 +115994,7 @@ async function createConfigFiles(config, dryRun) {
|
|
|
115982
115994
|
</Project>
|
|
115983
115995
|
`;
|
|
115984
115996
|
await import_fs_extra3.default.writeFile((0, import_path4.join)(projectDir, "Directory.Build.props"), buildProps);
|
|
115997
|
+
logger.info(`Target framework: ${source_default.cyan(targetFramework)}${config.preview ? " (preview)" : ""}`);
|
|
115985
115998
|
const connectionString = `Server=(local);Database=${projectName};Integrated Security=true;TrustServerCertificate=true;Connection Timeout=60;Pooling=true;Min Pool Size=0;Max Pool Size=50;Load Balance Timeout=30`;
|
|
115986
115999
|
const appSettings = {
|
|
115987
116000
|
ConnectionStrings: {
|
|
@@ -116814,19 +116827,40 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
116814
116827
|
process.exit(1);
|
|
116815
116828
|
}
|
|
116816
116829
|
}
|
|
116830
|
+
let finalProjectName = projectName;
|
|
116817
116831
|
const validation = validateCSharpNamespace(projectName);
|
|
116818
116832
|
if (!validation.valid) {
|
|
116819
|
-
logger.
|
|
116820
|
-
if (validation.suggestion) {
|
|
116821
|
-
|
|
116833
|
+
logger.warning(`Project name "${projectName}" contains invalid characters for C# namespace.`);
|
|
116834
|
+
if (validation.suggestion && !options.yes) {
|
|
116835
|
+
const { useSuggestion } = await lib_default.prompt([
|
|
116836
|
+
{
|
|
116837
|
+
type: "confirm",
|
|
116838
|
+
name: "useSuggestion",
|
|
116839
|
+
message: `Use "${source_default.cyan(validation.suggestion)}" as C# namespace instead?`,
|
|
116840
|
+
default: true
|
|
116841
|
+
}
|
|
116842
|
+
]);
|
|
116843
|
+
if (useSuggestion) {
|
|
116844
|
+
finalProjectName = validation.suggestion;
|
|
116845
|
+
logger.success(`Using "${finalProjectName}" as project name`);
|
|
116846
|
+
} else {
|
|
116847
|
+
logger.error(`Cannot continue with invalid project name.`);
|
|
116848
|
+
logger.info(`Tip: Rename folder to use only letters, digits, and underscores.`);
|
|
116849
|
+
process.exit(1);
|
|
116850
|
+
}
|
|
116851
|
+
} else if (validation.suggestion && options.yes) {
|
|
116852
|
+
finalProjectName = validation.suggestion;
|
|
116853
|
+
logger.info(`Auto-converted to "${finalProjectName}" for C# compatibility`);
|
|
116854
|
+
} else {
|
|
116855
|
+
logger.error(`Invalid project name: ${validation.error}`);
|
|
116856
|
+
process.exit(1);
|
|
116822
116857
|
}
|
|
116823
|
-
process.exit(1);
|
|
116824
116858
|
}
|
|
116825
116859
|
let config;
|
|
116826
116860
|
if (options.yes) {
|
|
116827
116861
|
config = {
|
|
116828
|
-
name:
|
|
116829
|
-
nameLower:
|
|
116862
|
+
name: finalProjectName,
|
|
116863
|
+
nameLower: finalProjectName.toLowerCase(),
|
|
116830
116864
|
database: "sqlserver",
|
|
116831
116865
|
preview: options.preview ?? false,
|
|
116832
116866
|
projectDir: inPlace ? projectDir : void 0,
|
|
@@ -116869,8 +116903,8 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
|
|
|
116869
116903
|
}
|
|
116870
116904
|
]);
|
|
116871
116905
|
config = {
|
|
116872
|
-
name:
|
|
116873
|
-
nameLower:
|
|
116906
|
+
name: finalProjectName,
|
|
116907
|
+
nameLower: finalProjectName.toLowerCase(),
|
|
116874
116908
|
database: "sqlserver",
|
|
116875
116909
|
preview: options.preview ?? false,
|
|
116876
116910
|
projectDir: inPlace ? projectDir : void 0,
|