Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(planka-import): default to the real Kaneo Cloud host

Andrej3863eb6ba1d5
diff --git a/apps/docs/core/migrations/from-planka.mdx b/apps/docs/core/migrations/from-planka.mdx
index d0afb42cc..a7475f677 100644
--- a/apps/docs/core/migrations/from-planka.mdx
+++ b/apps/docs/core/migrations/from-planka.mdx
@@ -51,7 +51,7 @@ When the plan looks right, add your Kaneo credentials and drop `--dry-run`:
```bash
npx @kaneo/planka-import \
--planka-url https://planka.example.com \
- --kaneo-url https://app.kaneo.app \
+ --kaneo-url https://cloud.kaneo.app \
--kaneo-api-key kaneo_xxx \
--workspace ws_123
```
@@ -132,7 +132,7 @@ before retrying.
| `--planka-password <pass>` | Password, or set `PLANKA_PASSWORD` |
| `--planka-token <token>` | Use an existing access token instead of logging in |
| `--planka-api-key <key>` | Use a PLANKA API key, or set `PLANKA_API_KEY`. Works for SSO-only accounts |
-| `--kaneo-url <url>` | Kaneo instance URL (default `https://app.kaneo.app`) |
+| `--kaneo-url <url>` | Kaneo instance URL (default `https://cloud.kaneo.app`) |
| `--kaneo-api-key <key>` | Kaneo API key, or set `KANEO_API_KEY` |
| `--workspace <id>` | Target workspace |
| `--project <name\|id>` | Migrate only this PLANKA project (repeatable) |
diff --git a/packages/planka-import/README.md b/packages/planka-import/README.md
index 821a622ac..1e84241c9 100644
--- a/packages/planka-import/README.md
+++ b/packages/planka-import/README.md
@@ -18,7 +18,7 @@ plan looks right, add your Kaneo credentials and drop `--dry-run`:
```bash
npx @kaneo/planka-import \
--planka-url https://planka.example.com \
- --kaneo-url https://app.kaneo.app \
+ --kaneo-url https://cloud.kaneo.app \
--kaneo-api-key kaneo_xxx \
--workspace ws_123
```
@@ -71,7 +71,7 @@ assignments come across on the first run.
| `--planka-password <pass>` | Password (or set `PLANKA_PASSWORD`) |
| `--planka-token <token>` | Use an existing access token instead of logging in |
| `--planka-api-key <key>` | Use a PLANKA API key (or `PLANKA_API_KEY`). Works for SSO-only accounts |
-| `--kaneo-url <url>` | Kaneo instance URL (default `https://app.kaneo.app`) |
+| `--kaneo-url <url>` | Kaneo instance URL (default `https://cloud.kaneo.app`) |
| `--kaneo-api-key <key>` | Kaneo API key (or set `KANEO_API_KEY`) |
| `--workspace <id>` | Target workspace (prompted if omitted) |
| `--project <name\|id>` | Migrate only this PLANKA project (repeatable) |
diff --git a/packages/planka-import/package.json b/packages/planka-import/package.json
index 63963094d..575bf16a3 100644
--- a/packages/planka-import/package.json
+++ b/packages/planka-import/package.json
@@ -1,6 +1,6 @@
{
"name": "@kaneo/planka-import",
- "version": "0.1.1",
+ "version": "0.1.2",
"description": "Migrate PLANKA boards into Kaneo: projects, lists, cards, labels, assignees, checklists and comments, over the public APIs of both",
"license": "MIT",
"author": "Kaneo (https://kaneo.app)",
diff --git a/packages/planka-import/src/args.test.ts b/packages/planka-import/src/args.test.ts
index 434297884..bf2c8f599 100644
--- a/packages/planka-import/src/args.test.ts
+++ b/packages/planka-import/src/args.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
-import { parseArgs } from "./args.js";
+import { DEFAULT_KANEO_URL, parseArgs } from "./args.js";
describe("parseArgs", () => {
it("returns defaults for an empty argv", () => {
@@ -62,3 +62,12 @@ describe("parseArgs", () => {
);
});
});
+
+describe("DEFAULT_KANEO_URL", () => {
+ it("points at Kaneo Cloud and is echoed in the help text", async () => {
+ const { HELP_TEXT } = await import("./args.js");
+
+ expect(DEFAULT_KANEO_URL).toBe("https://cloud.kaneo.app");
+ expect(HELP_TEXT).toContain(DEFAULT_KANEO_URL);
+ });
+});
diff --git a/packages/planka-import/src/args.ts b/packages/planka-import/src/args.ts
index 3303e9d3f..252d19b48 100644
--- a/packages/planka-import/src/args.ts
+++ b/packages/planka-import/src/args.ts
@@ -102,6 +102,8 @@ export function parseArgs(argv: string[]): ParsedArgs {
return parsed;
}
+export const DEFAULT_KANEO_URL = "https://cloud.kaneo.app";
+
export const HELP_TEXT = `kaneo-planka-import: migrate PLANKA boards into Kaneo
Usage:
@@ -117,7 +119,7 @@ PLANKA source:
password to log in with
Kaneo target:
- --kaneo-url <url> Kaneo instance URL (default https://app.kaneo.app)
+ --kaneo-url <url> Kaneo instance URL (default ${DEFAULT_KANEO_URL})
--kaneo-api-key <key> Kaneo API key (env KANEO_API_KEY)
--workspace <id> Target workspace ID (prompted if omitted)
diff --git a/packages/planka-import/src/index.ts b/packages/planka-import/src/index.ts
index ad14da365..37f2ee219 100644
--- a/packages/planka-import/src/index.ts
+++ b/packages/planka-import/src/index.ts
@@ -2,7 +2,7 @@
import { writeFile } from "node:fs/promises";
import { createRequire } from "node:module";
import prompts from "prompts";
-import { HELP_TEXT, parseArgs } from "./args.js";
+import { DEFAULT_KANEO_URL, HELP_TEXT, parseArgs } from "./args.js";
import { KaneoClient } from "./kaneo.js";
import { type BoardReport, type BoardTarget, migrate } from "./migrate.js";
import { PlankaClient } from "./planka.js";
@@ -106,7 +106,7 @@ async function main(): Promise<number> {
}
const kaneo = new KaneoClient({
- baseUrl: args.kaneoUrl ?? "https://app.kaneo.app",
+ baseUrl: args.kaneoUrl ?? DEFAULT_KANEO_URL,
apiKey: kaneoApiKey ?? "",
});