@nuucognition/flint-cli 0.6.0-dev.4 → 0.6.0-dev.5
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 +30 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -157843,6 +157843,36 @@ Created repository: ${export_pc.bold(name)}`));
|
|
|
157843
157843
|
process.exit(1);
|
|
157844
157844
|
}
|
|
157845
157845
|
})
|
|
157846
|
+
).addCommand(
|
|
157847
|
+
new Command("clone").description("Clone an existing remote into Workspace/Repos/ and declare it in flint.toml").argument("<name>", "Name for this repository (Proper Case)").argument("<remote>", "Git remote URL to clone from").option("-p, --path <dir>", "Path to flint (default: auto-detect)").action(async (name, remote, options3) => {
|
|
157848
|
+
try {
|
|
157849
|
+
const flintPath = options3.path || await findFlintRoot(process.cwd());
|
|
157850
|
+
if (!flintPath) {
|
|
157851
|
+
console.error(export_pc.red("Error: Not inside a Flint. Use --path or cd into a Flint."));
|
|
157852
|
+
process.exit(1);
|
|
157853
|
+
}
|
|
157854
|
+
const existing = await getWorkspaceRepository(flintPath, name);
|
|
157855
|
+
if (existing) {
|
|
157856
|
+
console.error(export_pc.red(`Error: Repository "${name}" already exists in flint.toml.`));
|
|
157857
|
+
process.exit(1);
|
|
157858
|
+
}
|
|
157859
|
+
console.log(export_pc.dim(`
|
|
157860
|
+
Cloning repository ${name} from ${remote}...`));
|
|
157861
|
+
await addWorkspaceRepository(flintPath, name, remote);
|
|
157862
|
+
const repoPath = await cloneRepository(flintPath, name, remote);
|
|
157863
|
+
await updateGitignore(flintPath);
|
|
157864
|
+
console.log(export_pc.green(`
|
|
157865
|
+
Cloned repository: ${export_pc.bold(name)}`));
|
|
157866
|
+
console.log(export_pc.dim(` Remote: ${remote}`));
|
|
157867
|
+
console.log(export_pc.dim(` Path: ${abbreviatePath(repoPath)}`));
|
|
157868
|
+
console.log(export_pc.dim(" Added to flint.toml [workspace] section"));
|
|
157869
|
+
console.log();
|
|
157870
|
+
} catch (err) {
|
|
157871
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
157872
|
+
console.error(export_pc.red(`Error: ${message}`));
|
|
157873
|
+
process.exit(1);
|
|
157874
|
+
}
|
|
157875
|
+
})
|
|
157846
157876
|
).addCommand(
|
|
157847
157877
|
new Command("remove").description("Remove a workspace repository").argument("<name>", "Name of the repository to remove").option("-f, --force", "Skip confirmation prompt").option("-p, --path <dir>", "Path to flint (default: auto-detect)").action(async (name, options3) => {
|
|
157848
157878
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuucognition/flint-cli",
|
|
3
|
-
"version": "0.6.0-dev.
|
|
3
|
+
"version": "0.6.0-dev.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Flint cognitive workspace CLI",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@nuucognition/flint": "0.1.0",
|
|
40
40
|
"@nuucognition/flint-migrations": "0.1.0",
|
|
41
41
|
"@nuucognition/orbh": "0.0.1-dev.0",
|
|
42
|
-
"@nuucognition/
|
|
43
|
-
"@nuucognition/
|
|
42
|
+
"@nuucognition/typescript-config": "0.0.0",
|
|
43
|
+
"@nuucognition/orbh-cli": "0.1.0-dev.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"predev": "turbo build --filter=@nuucognition/flint-cli^...",
|