@astralkit/cli 4.8.1 → 4.8.3
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/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/src/commands/add.js +4 -3
- package/src/lib/validators.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to the `@astralkit/cli` package.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [4.8.3] (2026-12-03)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **A new workflow comes with its `.env.example`.** The rule that never writes `.env` files also held back the example, so a scaffolded workflow had no template of the keys it needs. A fresh scaffold now writes `.env.example`; `.env` and `.env.local` are still never written, and an overlay into an existing project writes none of them.
|
|
12
|
+
|
|
13
|
+
## [4.8.2] (2026-12-03)
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **A component already in the project counts as installed.** Installing several at once (`astralkit add zest-faq button`, or a website) where one was already there ended "Not installed: ..." with exit code 1, so an agent re-running an install was told it had failed. It now says "Already in your project" and keeps the file; `--overwrite` still replaces it.
|
|
17
|
+
|
|
8
18
|
## [4.8.1] (2026-12-03)
|
|
9
19
|
|
|
10
20
|
### Fixed
|
package/package.json
CHANGED
package/src/commands/add.js
CHANGED
|
@@ -263,9 +263,10 @@ async function addComponent(componentSlug, options) {
|
|
|
263
263
|
const targetFile = path.resolve(process.cwd(), componentsDir, `${componentSlug}${ext}`);
|
|
264
264
|
|
|
265
265
|
if (fs.existsSync(targetFile) && !options.overwrite) {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
// Already in the project counts as installed (2026-12-03): an agent re-running an install of several was told
|
|
267
|
+
// "Not installed" with exit code 1, and could take that as a reason to write the component by hand.
|
|
268
|
+
p.log.info(`Already in your project: ${componentsDir}/${componentSlug}${ext} (kept as it is; --overwrite replaces it)`);
|
|
269
|
+
return true;
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
const spinner = ora(`Fetching ${pc.cyan(componentSlug)} (${FRAMEWORK_LABELS[framework]})...`).start();
|
package/src/lib/validators.js
CHANGED
|
@@ -176,6 +176,8 @@ const SCAFFOLD_ALLOWED_FILES = [
|
|
|
176
176
|
// Scaffolds may carry install settings (e.g. legacy-peer-deps). No more
|
|
177
177
|
// powerful than the package.json install scripts a scaffold already ships.
|
|
178
178
|
/^\.npmrc$/i,
|
|
179
|
+
// the workflow's environment template: names and placeholders to copy into .env.local. Never .env itself.
|
|
180
|
+
/^\.env\.example$/i,
|
|
179
181
|
];
|
|
180
182
|
|
|
181
183
|
function isScaffoldAllowed(relPath) {
|