@nolto/cli 0.19.0 → 0.19.1

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 +7 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2096,7 +2096,13 @@ async function ensureRoadmapCache(args) {
2096
2096
  const basename = path12.basename(args.repoRoot);
2097
2097
  const slug = args.slug ?? slugifyProjectId(basename);
2098
2098
  const collision = list.roadmaps.find((row) => row.slug === slug);
2099
- if (collision) throw new CliError(`Roadmap slug "${slug}" already exists in this project (repo: ${collision.repoIdentity ?? "unknown"}). Run \`nolto link --slug <other-slug>\` to name this repository's roadmap.`, 2);
2099
+ if (collision) {
2100
+ if (args.slug === void 0) {
2101
+ log(`skipped \u2014 "${slug}" is another repository's roadmap (${collision.repoIdentity ?? "unknown"}). Run \`nolto link --slug <name>\` to create one for this repository.`);
2102
+ return;
2103
+ }
2104
+ throw new CliError(`Roadmap slug "${slug}" already exists in this project (repo: ${collision.repoIdentity ?? "unknown"}). Run \`nolto link --slug <other-slug>\` to name this repository's roadmap.`, 2);
2105
+ }
2100
2106
  let existing;
2101
2107
  try {
2102
2108
  existing = await readCache(env, projectId, slug);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolto/cli",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "CLI for syncing repository roadmaps with Nolto.",
5
5
  "license": "MIT",
6
6
  "type": "module",