nemonicon-cli 0.2.0 → 0.2.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 +4 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -127,9 +127,7 @@ var LOOPBACK_PORTS = [
127
127
  33426,
128
128
  33427
129
129
  ];
130
- var REDIRECT_URIS = LOOPBACK_PORTS.map(
131
- (p) => `http://127.0.0.1:${p}/callback`
132
- );
130
+ var REDIRECT_URIS = ["http://127.0.0.1/callback"];
133
131
  var SCOPE = "mcp";
134
132
  var CLIENT_NAME = "Nemonicon CLI";
135
133
  var OauthError = class extends Error {
@@ -756,18 +754,7 @@ Config was saved to ~/.nemonicon/config.json \u2014 you can edit it manually.`
756
754
 
757
755
  // src/commands/login.ts
758
756
  import { Command as Command2 } from "commander";
759
- import { createInterface as createInterface2 } from "readline";
760
757
  var DEFAULT_API_URL2 = "https://app.nemonicon.com";
761
- function prompt2(question, defaultValue) {
762
- const rl = createInterface2({ input: process.stdin, output: process.stdout });
763
- const suffix = defaultValue ? ` (${defaultValue})` : "";
764
- return new Promise((resolve) => {
765
- rl.question(`${question}${suffix}: `, (answer) => {
766
- rl.close();
767
- resolve(answer.trim() || defaultValue || "");
768
- });
769
- });
770
- }
771
758
  var loginCommand = new Command2("login").description(
772
759
  "Sign in to Nemonicon via your browser using OAuth 2.1 + PKCE"
773
760
  ).option("--api-url <url>", "API server URL").option(
@@ -779,10 +766,7 @@ var loginCommand = new Command2("login").description(
779
766
  ).action(
780
767
  async (options) => {
781
768
  const existing = loadPartialConfig();
782
- let apiUrl = options.apiUrl ?? existing?.apiUrl;
783
- if (!apiUrl) {
784
- apiUrl = await prompt2("API URL", DEFAULT_API_URL2);
785
- }
769
+ let apiUrl = options.apiUrl ?? existing?.apiUrl ?? DEFAULT_API_URL2;
786
770
  apiUrl = apiUrl.replace(/\/+$/, "");
787
771
  const protectionBypass = options.protectionBypass ?? existing?.protectionBypass;
788
772
  const apiUrlChanged = existing?.apiUrl !== void 0 && existing.apiUrl.replace(/\/+$/, "") !== apiUrl;
@@ -1184,9 +1168,9 @@ var updateCommand = new Command9("update").description("Update a single outline
1184
1168
 
1185
1169
  // src/commands/delete.ts
1186
1170
  import { Command as Command10 } from "commander";
1187
- import { createInterface as createInterface3 } from "readline";
1171
+ import { createInterface as createInterface2 } from "readline";
1188
1172
  function confirm(question) {
1189
- const rl = createInterface3({ input: process.stdin, output: process.stdout });
1173
+ const rl = createInterface2({ input: process.stdin, output: process.stdout });
1190
1174
  return new Promise((resolve) => {
1191
1175
  rl.question(`${question} [y/N] `, (answer) => {
1192
1176
  rl.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nemonicon-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI tool for Nemonicon knowledge management",
5
5
  "type": "module",
6
6
  "bin": {