@cmssy/cli 19.26.2 → 19.26.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2019,9 +2019,16 @@ async function selectWorkspace(workspaces, options, deps) {
2019
2019
  const slugs = workspaces.map((workspace) => `${workspace.organizationSlug}/${workspace.slug}`).join(", ");
2020
2020
  if (options.workspace) {
2021
2021
  const wanted = options.workspace.trim();
2022
- const match = workspaces.find(
2022
+ const matches = workspaces.filter(
2023
2023
  (workspace) => workspace.slug === wanted || `${workspace.organizationSlug}/${workspace.slug}` === wanted
2024
2024
  );
2025
+ const match = matches[0];
2026
+ if (matches.length > 1) {
2027
+ throw new CliError(
2028
+ `"${wanted}" names a workspace in more than one organization`,
2029
+ `pass <organization>/<workspace> - one of: ${matches.map((workspace) => `${workspace.organizationSlug}/${workspace.slug}`).join(", ")}`
2030
+ );
2031
+ }
2025
2032
  if (!match) {
2026
2033
  throw new CliError(
2027
2034
  `no workspace named "${wanted}"`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/cli",
3
- "version": "19.26.2",
3
+ "version": "19.26.3",
4
4
  "description": "The cmssy CLI: `cmssy init` wires cmssy into an existing Next.js, Astro or React Router app; `cmssy link` connects it to a workspace and verifies the editor wiring.",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "esbuild": "^0.27.7",
31
- "@cmssy/core": "19.26.2"
31
+ "@cmssy/core": "19.26.3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^20.0.0",