galadrim-feedback 1.0.3 → 1.0.4
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/README.md +0 -15
- package/bin/cli.js +72 -33
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -257,25 +257,10 @@ Get all tickets/cards from a specific Trello list.
|
|
|
257
257
|
|
|
258
258
|
Get all available statuses from a Notion database. This tool retrieves the status options (like "Backlog", "To do", "In Progress", etc.) that are configured in your Notion database.
|
|
259
259
|
|
|
260
|
-
**Parameters:**
|
|
261
|
-
|
|
262
|
-
- `notionDatabaseId`: The ID of the Notion database
|
|
263
|
-
- `projectId`: The project ID for authorization
|
|
264
|
-
- `authToken`: JWT authentication token
|
|
265
|
-
|
|
266
260
|
#### `get_notion_status_tickets`
|
|
267
261
|
|
|
268
262
|
Get all tickets from a Notion database with a specific status. This tool allows you to filter and retrieve tickets based on their current status.
|
|
269
263
|
|
|
270
|
-
**Parameters:**
|
|
271
|
-
|
|
272
|
-
- `notionDatabaseId`: The ID of the Notion database
|
|
273
|
-
- `statusName`: The name of the status to filter by (e.g., "Backlog", "To do")
|
|
274
|
-
- `projectId`: The project ID for authorization
|
|
275
|
-
- `authToken`: JWT authentication token
|
|
276
|
-
|
|
277
|
-
**Returns:** Array of tickets with details including ID, title, URL, status information, creation time, and last edit time.
|
|
278
|
-
|
|
279
264
|
## CLI Commands
|
|
280
265
|
|
|
281
266
|
Galadrim Feedback includes a CLI tool for easier setup and management.
|
package/bin/cli.js
CHANGED
|
@@ -1,47 +1,86 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
import { dirname, join } from "path";
|
|
6
|
-
import { spawn, exec } from "child_process";
|
|
7
|
-
import { promisify } from "util";
|
|
8
|
-
import * as vscode from "vscode-test";
|
|
9
|
-
|
|
10
|
-
const execAsync = promisify(exec);
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = dirname(__filename);
|
|
3
|
+
import { spawn } from "child_process";
|
|
13
4
|
|
|
14
5
|
const PROJECT_ID = process.argv
|
|
15
6
|
.find((arg) => arg.startsWith("--project-id="))
|
|
16
7
|
?.split("=")[1]
|
|
17
8
|
.trim();
|
|
18
9
|
|
|
10
|
+
const NOTION_DATABASE_ID = process.argv
|
|
11
|
+
.find((arg) => arg.startsWith("--notion-database-id="))
|
|
12
|
+
?.split("=")[1]
|
|
13
|
+
.trim();
|
|
14
|
+
|
|
19
15
|
const CURSOR_PROMPT = `Install and configure Galadrim Feedback in this React project:
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
yarn add axios galadrim-feedback
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Babel Plugin Configuration
|
|
21
|
+
|
|
22
|
+
Add the **babel-plugin-react-generate-paths** plugin to your Babel configuration.
|
|
23
|
+
|
|
24
|
+
#### Option 1: In vite.config.ts
|
|
25
|
+
|
|
26
|
+
If you're using Vite, add the plugin in the vite.config.ts file as follows:
|
|
27
|
+
|
|
28
|
+
import { defineConfig } from "vite";
|
|
29
|
+
import react from "@vitejs/plugin-react";
|
|
30
|
+
|
|
31
|
+
// https://vitejs.dev/config/
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
plugins: [
|
|
34
|
+
react({
|
|
35
|
+
babel: {
|
|
36
|
+
plugins: [["babel-plugin-react-generate-paths"]],
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
#### Option 2: In .babelrc
|
|
43
|
+
|
|
44
|
+
If you're using a .babelrc file, add the plugin to the plugins section:
|
|
45
|
+
|
|
46
|
+
{
|
|
47
|
+
"plugins": ["babel-plugin-react-generate-paths"]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#### For React Router: (check the package.json to see if you are using react router, this config is only needed if you are using react router, but not for react-router-dom)
|
|
51
|
+
|
|
52
|
+
// vite.config.ts
|
|
53
|
+
import { reactRouter } from "@react-router/dev/vite";
|
|
54
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
55
|
+
import { defineConfig } from "vite";
|
|
56
|
+
import babel from "vite-plugin-babel";
|
|
57
|
+
import tsconfigPaths from "vite-tsconfig-paths";
|
|
58
|
+
|
|
59
|
+
export default defineConfig({
|
|
60
|
+
plugins: [
|
|
61
|
+
babel({
|
|
62
|
+
include: ["./app/**/*.tsx", "./app/**/*.ts"],
|
|
63
|
+
filter: (name) => name.endsWith(".tsx"),
|
|
64
|
+
}),
|
|
65
|
+
reactRouter(),
|
|
66
|
+
// [...]
|
|
67
|
+
],
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
// .babelrc
|
|
72
|
+
{
|
|
73
|
+
"presets": ["@babel/preset-typescript"],
|
|
74
|
+
"plugins": ["babel-plugin-react-generate-paths"]
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
40
79
|
|
|
41
80
|
3. Configure FeedbackRoot component:
|
|
42
81
|
- Run \`pwd\` command in the frontend root directory and use this absolute path for rootDir prop
|
|
43
82
|
- Detect navigation package used in the project:
|
|
44
|
-
* If using React Router (react-router-dom):
|
|
83
|
+
* If using React Router Dom (react-router-dom):
|
|
45
84
|
- Import: import { useNavigate } from "react-router-dom";
|
|
46
85
|
- Hook: const navigate = useNavigate();
|
|
47
86
|
- Navigate prop: navigate={(path) => navigate(path)}
|
|
@@ -61,7 +100,7 @@ const CURSOR_PROMPT = `Install and configure Galadrim Feedback in this React pro
|
|
|
61
100
|
- projectId="${PROJECT_ID}"
|
|
62
101
|
- navigate={(path) => navigate(path)} (using detected navigation method)
|
|
63
102
|
- position="bottom-right"
|
|
64
|
-
- notionDatabaseId
|
|
103
|
+
- notionDatabaseId="${NOTION_DATABASE_ID}"
|
|
65
104
|
* Place it inside the router context but outside main content areas
|
|
66
105
|
|
|
67
106
|
4. Verification:
|
|
@@ -76,14 +115,14 @@ function showHelp() {
|
|
|
76
115
|
🚀 Galadrim Feedback CLI
|
|
77
116
|
|
|
78
117
|
Usage:
|
|
79
|
-
npx galadrim-feedback <command> [--project-id
|
|
118
|
+
npx galadrim-feedback <command> [--project-id=<project-id>] [--notion-database-id=<notion-database-id>]
|
|
80
119
|
|
|
81
120
|
Commands:
|
|
82
121
|
cursor-init Send the installation prompt directly to Cursor/VS Code
|
|
83
122
|
help Show this help message
|
|
84
123
|
|
|
85
124
|
Examples:
|
|
86
|
-
npx galadrim-feedback cursor-init --project-id
|
|
125
|
+
npx galadrim-feedback cursor-init --project-id=<project-id> --notion-database-id=<notion-database-id>
|
|
87
126
|
npx galadrim-feedback help
|
|
88
127
|
`);
|
|
89
128
|
}
|