floq 1.6.0 → 1.7.0

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.
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import { listTasks, listProjects } from './commands/list.js';
7
7
  import { moveTask } from './commands/move.js';
8
8
  import { markDone } from './commands/done.js';
9
9
  import { addProject, listProjectsCommand, showProject, completeProject, } from './commands/project.js';
10
- import { showConfig, setLanguage, setDbPath, resetDbPath, setTheme, selectTheme, setViewModeCommand, selectMode, setTurso, disableTurso, enableTurso, clearTurso, syncCommand, resetDatabase, setSplashCommand, showSplash, showDateFormatCommand, setDateFormatCommand } from './commands/config.js';
10
+ import { showConfig, setLanguage, setDbPath, resetDbPath, setTheme, selectTheme, setViewModeCommand, selectMode, setTurso, disableTurso, enableTurso, clearTurso, showTursoQr, syncCommand, resetDatabase, setSplashCommand, showSplash, showDateFormatCommand, setDateFormatCommand } from './commands/config.js';
11
11
  import { addComment, listComments } from './commands/comment.js';
12
12
  import { listContexts, addContextCommand, removeContextCommand } from './commands/context.js';
13
13
  import { showInsights } from './commands/insights.js';
@@ -153,8 +153,12 @@ configCmd
153
153
  .option('--disable', 'Temporarily disable Turso sync (preserves config)')
154
154
  .option('--enable', 'Re-enable Turso sync')
155
155
  .option('--clear', 'Remove Turso configuration completely')
156
+ .option('--qr', 'Display Turso config as QR code')
156
157
  .action(async (options) => {
157
- if (options.clear) {
158
+ if (options.qr) {
159
+ await showTursoQr();
160
+ }
161
+ else if (options.clear) {
158
162
  await clearTurso();
159
163
  }
160
164
  else if (options.disable) {
@@ -7,6 +7,7 @@ export declare function selectTheme(): Promise<void>;
7
7
  export declare function showViewMode(): Promise<void>;
8
8
  export declare function setViewModeCommand(mode: string): Promise<void>;
9
9
  export declare function selectMode(): Promise<void>;
10
+ export declare function showTursoQr(): Promise<void>;
10
11
  export declare function setTurso(url: string, token: string): Promise<void>;
11
12
  export declare function disableTurso(): Promise<void>;
12
13
  export declare function enableTurso(): Promise<void>;
@@ -127,6 +127,22 @@ export async function selectMode() {
127
127
  }));
128
128
  });
129
129
  }
130
+ export async function showTursoQr() {
131
+ const turso = getTursoConfig();
132
+ if (!turso || !turso.url || !turso.authToken) {
133
+ console.error('Turso is not configured.');
134
+ console.error('Use "floq config turso --url <url> --token <token>" to configure first.');
135
+ process.exit(1);
136
+ }
137
+ const qrcode = await import('qrcode');
138
+ const data = JSON.stringify({ url: turso.url, authToken: turso.authToken });
139
+ const qr = await qrcode.default.toString(data, { type: 'terminal', small: true });
140
+ console.log('');
141
+ console.log('Turso Configuration QR Code:');
142
+ console.log('');
143
+ console.log(qr);
144
+ console.log('⚠️ This QR code contains your auth token. Do not share publicly.');
145
+ }
130
146
  export async function setTurso(url, token) {
131
147
  setTursoConfig({ url, authToken: token, enabled: true });
132
148
  console.log('Turso sync enabled');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "floq",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Floq - Getting Things Done Task Manager with MS-DOS style themes",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -48,12 +48,14 @@
48
48
  "ink": "^5.1.0",
49
49
  "ink-text-input": "^6.0.0",
50
50
  "open": "^10.1.0",
51
+ "qrcode": "^1.5.4",
51
52
  "react": "^18.3.1",
52
53
  "uuid": "^11.0.5"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@types/better-sqlite3": "^7.6.12",
56
57
  "@types/node": "^22.10.7",
58
+ "@types/qrcode": "^1.5.6",
57
59
  "@types/react": "^18.3.18",
58
60
  "@types/uuid": "^10.0.0",
59
61
  "drizzle-kit": "^0.31.8",