replicas-cli 0.2.88 → 0.2.91
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.
|
@@ -8149,6 +8149,16 @@ function generatePlaceholderName() {
|
|
|
8149
8149
|
}
|
|
8150
8150
|
|
|
8151
8151
|
// ../shared/src/workspace-groups.ts
|
|
8152
|
+
function findRepositorySetForWorkspace(workspaceRepoIds, repositorySets) {
|
|
8153
|
+
if (workspaceRepoIds.length <= 1) return null;
|
|
8154
|
+
for (const set of repositorySets) {
|
|
8155
|
+
const setRepoIds = new Set(set.repositories.map((r) => r.id));
|
|
8156
|
+
if (workspaceRepoIds.every((id) => setRepoIds.has(id))) {
|
|
8157
|
+
return set;
|
|
8158
|
+
}
|
|
8159
|
+
}
|
|
8160
|
+
return null;
|
|
8161
|
+
}
|
|
8152
8162
|
function buildGroups(workspaces, workspacesData, repositories, repositorySets, mockGroupAssignments) {
|
|
8153
8163
|
const groupMap = /* @__PURE__ */ new Map();
|
|
8154
8164
|
for (const repo of repositories) {
|
|
@@ -8162,17 +8172,13 @@ function buildGroups(workspaces, workspacesData, repositories, repositorySets, m
|
|
|
8162
8172
|
for (const workspace of workspaces) {
|
|
8163
8173
|
const repos = allWsRepos.filter((r) => r.workspace_id === workspace.id);
|
|
8164
8174
|
if (repos.length > 0) {
|
|
8175
|
+
const matchingSet = findRepositorySetForWorkspace(repos.map((r) => r.id), repositorySets);
|
|
8165
8176
|
let placedInSet = false;
|
|
8166
|
-
|
|
8167
|
-
const
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
if (groupMap.has(setKey)) {
|
|
8172
|
-
groupMap.get(setKey).workspaces.push(workspace);
|
|
8173
|
-
placedInSet = true;
|
|
8174
|
-
break;
|
|
8175
|
-
}
|
|
8177
|
+
if (matchingSet) {
|
|
8178
|
+
const setKey = `set:${matchingSet.id}`;
|
|
8179
|
+
if (groupMap.has(setKey)) {
|
|
8180
|
+
groupMap.get(setKey).workspaces.push(workspace);
|
|
8181
|
+
placedInSet = true;
|
|
8176
8182
|
}
|
|
8177
8183
|
}
|
|
8178
8184
|
if (!placedInSet) {
|
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
setIdeCommand,
|
|
16
16
|
setOrganizationId,
|
|
17
17
|
writeConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7W77EZFX.mjs";
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
import "dotenv/config";
|
|
@@ -2509,12 +2509,12 @@ async function interactiveCommand() {
|
|
|
2509
2509
|
);
|
|
2510
2510
|
}
|
|
2511
2511
|
console.log(chalk18.gray("Starting interactive mode..."));
|
|
2512
|
-
const { launchInteractive } = await import("./interactive-
|
|
2512
|
+
const { launchInteractive } = await import("./interactive-MD44DDIJ.mjs");
|
|
2513
2513
|
await launchInteractive();
|
|
2514
2514
|
}
|
|
2515
2515
|
|
|
2516
2516
|
// src/index.ts
|
|
2517
|
-
var CLI_VERSION = "0.2.
|
|
2517
|
+
var CLI_VERSION = "0.2.91";
|
|
2518
2518
|
var program = new Command();
|
|
2519
2519
|
program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
|
|
2520
2520
|
program.command("login").description("Authenticate with your Replicas account").action(async () => {
|