replicas-cli 0.3.655 → 0.3.656
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.cjs +31 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -43370,7 +43370,7 @@ var CLI_VERSION;
|
|
|
43370
43370
|
var init_cli_version = __esm({
|
|
43371
43371
|
"../shared/src/cli-version.ts"() {
|
|
43372
43372
|
"use strict";
|
|
43373
|
-
CLI_VERSION = "0.3.
|
|
43373
|
+
CLI_VERSION = "0.3.656";
|
|
43374
43374
|
}
|
|
43375
43375
|
});
|
|
43376
43376
|
|
|
@@ -57388,6 +57388,35 @@ async function repositoriesAddCommand(fullName, options) {
|
|
|
57388
57388
|
await orgAuthenticatedFetch("/v1/repositories", { method: "POST", body: body2 });
|
|
57389
57389
|
outputSuccess(`Added ${matched.label}`);
|
|
57390
57390
|
}
|
|
57391
|
+
async function repositoriesImportGroupCommand(group, options) {
|
|
57392
|
+
const body2 = {
|
|
57393
|
+
group,
|
|
57394
|
+
include_subgroups: options.subgroups !== false
|
|
57395
|
+
};
|
|
57396
|
+
const result = await orgAuthenticatedFetch("/v1/gitlab/groups/import", {
|
|
57397
|
+
method: "POST",
|
|
57398
|
+
body: body2
|
|
57399
|
+
});
|
|
57400
|
+
output2(result, (res) => {
|
|
57401
|
+
const parts = [
|
|
57402
|
+
`Added ${res.added.length}`,
|
|
57403
|
+
res.already_connected > 0 ? `${res.already_connected} already connected` : null,
|
|
57404
|
+
res.failed.length > 0 ? `${res.failed.length} failed` : null
|
|
57405
|
+
].filter(Boolean);
|
|
57406
|
+
console.log(import_chalk20.default.green(`
|
|
57407
|
+
Imported GitLab group ${res.group}: ${parts.join(", ")} (${res.total} total).
|
|
57408
|
+
`));
|
|
57409
|
+
if (res.has_more) {
|
|
57410
|
+
console.log(import_chalk20.default.yellow("Warning: GitLab returned more projects than the page limit. Import specific subgroups to connect the rest.\n"));
|
|
57411
|
+
}
|
|
57412
|
+
if (res.failed.length > 0) {
|
|
57413
|
+
for (const failure2 of res.failed) {
|
|
57414
|
+
console.log(import_chalk20.default.red(` \u2717 ${failure2.path}: ${failure2.error}`));
|
|
57415
|
+
}
|
|
57416
|
+
console.log();
|
|
57417
|
+
}
|
|
57418
|
+
});
|
|
57419
|
+
}
|
|
57391
57420
|
async function repositoriesUpdateCommand(repository, options) {
|
|
57392
57421
|
const [id] = await resolveRepositoryIds([repository]);
|
|
57393
57422
|
const body2 = { default_branch: options.defaultBranch };
|
|
@@ -62651,6 +62680,7 @@ var init_src2 = __esm({
|
|
|
62651
62680
|
repos.command("list").description("List all repositories").action(run(repositoriesListCommand));
|
|
62652
62681
|
repos.command("available").description("List GitHub and GitLab repositories Replicas can add").option("--provider <provider>", "Filter by provider: github or gitlab").action(run(repositoriesAvailableCommand));
|
|
62653
62682
|
repos.command("add <owner/name>").description("Add a GitHub or GitLab repository (admins only)").option("-b, --default-branch <branch>", "Default branch (defaults to the repository default)").option("--provider <provider>", "Provider: github or gitlab").action(run(repositoriesAddCommand));
|
|
62683
|
+
repos.command("import-group <group>").description("Connect all projects in a GitLab group (admins only)").option("--no-subgroups", "Only import direct projects in the group, excluding subgroups").action(run(repositoriesImportGroupCommand));
|
|
62654
62684
|
repos.command("update <name-or-id>").description("Change the default branch of a repository (admins only)").requiredOption("-b, --default-branch <branch>", "New default branch").action(run(repositoriesUpdateCommand));
|
|
62655
62685
|
repos.command("delete <name-or-id>").description("Remove a repository (admins only)").action(run(repositoriesDeleteCommand));
|
|
62656
62686
|
repos.command("branches <name-or-id>").description("List branches of a repository").action(run(repositoriesBranchesCommand));
|