hale-commenting-system 2.0.2 → 2.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.
Files changed (58) hide show
  1. package/README.md +16 -207
  2. package/bin/detect.d.ts +1 -0
  3. package/bin/detect.js +62 -0
  4. package/bin/generators.d.ts +18 -0
  5. package/bin/generators.js +193 -0
  6. package/bin/hale-commenting.js +4 -0
  7. package/bin/index.d.ts +2 -0
  8. package/bin/index.js +61 -0
  9. package/bin/onboarding.d.ts +1 -0
  10. package/bin/onboarding.js +170 -0
  11. package/bin/postinstall.d.ts +2 -0
  12. package/bin/postinstall.js +65 -0
  13. package/bin/validators.d.ts +2 -0
  14. package/bin/validators.js +66 -0
  15. package/dist/cli/detect.d.ts +1 -0
  16. package/dist/cli/detect.js +62 -0
  17. package/dist/cli/generators.d.ts +18 -0
  18. package/dist/cli/generators.js +193 -0
  19. package/dist/cli/index.d.ts +2 -0
  20. package/dist/cli/index.js +61 -0
  21. package/dist/cli/onboarding.d.ts +1 -0
  22. package/dist/cli/onboarding.js +170 -0
  23. package/dist/cli/postinstall.d.ts +2 -0
  24. package/dist/cli/postinstall.js +65 -0
  25. package/dist/cli/validators.d.ts +2 -0
  26. package/dist/cli/validators.js +66 -0
  27. package/dist/components/CommentOverlay.d.ts +2 -0
  28. package/dist/components/CommentOverlay.js +101 -0
  29. package/dist/components/CommentPanel.d.ts +6 -0
  30. package/dist/components/CommentPanel.js +334 -0
  31. package/dist/components/CommentPin.d.ts +11 -0
  32. package/dist/components/CommentPin.js +64 -0
  33. package/dist/components/DetailsTab.d.ts +2 -0
  34. package/dist/components/DetailsTab.js +380 -0
  35. package/dist/components/FloatingWidget.d.ts +8 -0
  36. package/dist/components/FloatingWidget.js +128 -0
  37. package/dist/components/JiraTab.d.ts +2 -0
  38. package/dist/components/JiraTab.js +507 -0
  39. package/dist/contexts/CommentContext.d.ts +30 -0
  40. package/dist/contexts/CommentContext.js +891 -0
  41. package/dist/contexts/GitHubAuthContext.d.ts +13 -0
  42. package/dist/contexts/GitHubAuthContext.js +96 -0
  43. package/dist/index.d.ts +10 -97
  44. package/dist/index.js +26 -789
  45. package/dist/services/githubAdapter.d.ts +56 -0
  46. package/dist/services/githubAdapter.js +321 -0
  47. package/dist/types/index.d.ts +25 -0
  48. package/dist/types/index.js +2 -0
  49. package/dist/utils/version.d.ts +1 -0
  50. package/dist/utils/version.js +23 -0
  51. package/package.json +39 -38
  52. package/templates/webpack-middleware.js +226 -0
  53. package/cli/dist/index.js +0 -370
  54. package/cli/dist/index.js.map +0 -1
  55. package/dist/index.d.mts +0 -97
  56. package/dist/index.js.map +0 -1
  57. package/dist/index.mjs +0 -762
  58. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,56 @@
1
+ export interface GitHubUser {
2
+ login: string;
3
+ avatar: string;
4
+ }
5
+ export declare const GITHUB_TOKEN_STORAGE_KEY = "github_access_token";
6
+ export declare const GITHUB_USER_STORAGE_KEY = "github_user";
7
+ export declare const storeGitHubAuth: (token: string, user: GitHubUser) => void;
8
+ export declare const clearGitHubAuth: () => void;
9
+ export declare const getStoredToken: () => string | null;
10
+ export declare const getStoredUser: () => GitHubUser | null;
11
+ export declare const isGitHubConfigured: () => boolean;
12
+ export declare const diagnoseGitHubSetup: () => {
13
+ hasToken: boolean;
14
+ hasUser: boolean;
15
+ hasOwner: boolean;
16
+ hasRepo: boolean;
17
+ isComplete: boolean;
18
+ };
19
+ export interface GitHubResult<T = any> {
20
+ success: boolean;
21
+ data?: T;
22
+ error?: string;
23
+ }
24
+ export declare const githubAdapter: {
25
+ createIssue(params: {
26
+ title: string;
27
+ body: string;
28
+ route: string;
29
+ xPercent: number;
30
+ yPercent: number;
31
+ version?: string;
32
+ }): Promise<GitHubResult<{
33
+ number: number;
34
+ html_url: string;
35
+ }>>;
36
+ createComment(issueNumber: number, body: string): Promise<GitHubResult>;
37
+ fetchIssuesForRoute(route: string): Promise<GitHubResult<any[]>>;
38
+ fetchIssuesForRouteAndVersion(route: string, version?: string): Promise<GitHubResult<any[]>>;
39
+ fetchIssueComments(issueNumber: number): Promise<GitHubResult<any[]>>;
40
+ updateComment(commentId: number, body: string): Promise<GitHubResult>;
41
+ deleteComment(commentId: number): Promise<GitHubResult>;
42
+ closeIssue(issueNumber: number): Promise<GitHubResult>;
43
+ reopenIssue(issueNumber: number): Promise<GitHubResult>;
44
+ getRepoFile(path: string): Promise<GitHubResult<{
45
+ text: string;
46
+ sha: string;
47
+ } | null>>;
48
+ putRepoFile(params: {
49
+ path: string;
50
+ text: string;
51
+ message: string;
52
+ sha?: string;
53
+ }): Promise<GitHubResult<{
54
+ sha: string;
55
+ }>>;
56
+ };
@@ -0,0 +1,321 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.githubAdapter = exports.diagnoseGitHubSetup = exports.isGitHubConfigured = exports.getStoredUser = exports.getStoredToken = exports.clearGitHubAuth = exports.storeGitHubAuth = exports.GITHUB_USER_STORAGE_KEY = exports.GITHUB_TOKEN_STORAGE_KEY = void 0;
4
+ exports.GITHUB_TOKEN_STORAGE_KEY = 'github_access_token';
5
+ exports.GITHUB_USER_STORAGE_KEY = 'github_user';
6
+ const storeGitHubAuth = (token, user) => {
7
+ localStorage.setItem(exports.GITHUB_TOKEN_STORAGE_KEY, token);
8
+ localStorage.setItem(exports.GITHUB_USER_STORAGE_KEY, JSON.stringify(user));
9
+ };
10
+ exports.storeGitHubAuth = storeGitHubAuth;
11
+ const clearGitHubAuth = () => {
12
+ localStorage.removeItem(exports.GITHUB_TOKEN_STORAGE_KEY);
13
+ localStorage.removeItem(exports.GITHUB_USER_STORAGE_KEY);
14
+ };
15
+ exports.clearGitHubAuth = clearGitHubAuth;
16
+ const getStoredToken = () => {
17
+ return localStorage.getItem(exports.GITHUB_TOKEN_STORAGE_KEY);
18
+ };
19
+ exports.getStoredToken = getStoredToken;
20
+ const getStoredUser = () => {
21
+ const raw = localStorage.getItem(exports.GITHUB_USER_STORAGE_KEY);
22
+ if (!raw)
23
+ return null;
24
+ try {
25
+ return JSON.parse(raw);
26
+ }
27
+ catch {
28
+ return null;
29
+ }
30
+ };
31
+ exports.getStoredUser = getStoredUser;
32
+ const isGitHubConfigured = () => {
33
+ return Boolean((0, exports.getStoredToken)() && process.env.VITE_GITHUB_OWNER && process.env.VITE_GITHUB_REPO);
34
+ };
35
+ exports.isGitHubConfigured = isGitHubConfigured;
36
+ const diagnoseGitHubSetup = () => {
37
+ const token = (0, exports.getStoredToken)();
38
+ const user = (0, exports.getStoredUser)();
39
+ const owner = process.env.VITE_GITHUB_OWNER;
40
+ const repo = process.env.VITE_GITHUB_REPO;
41
+ console.log('🔍 GitHub Configuration Diagnostic:');
42
+ console.log(' Token:', token ? `Present (${token.substring(0, 10)}...)` : 'Missing ❌');
43
+ console.log(' User:', user ? `${user.login}` : 'Not logged in ❌');
44
+ console.log(' Owner:', owner || 'Missing ❌');
45
+ console.log(' Repo:', repo || 'Missing ❌');
46
+ console.log(' Full repo path:', owner && repo ? `${owner}/${repo}` : 'Incomplete ❌');
47
+ console.log('\n💡 To fix 403 Forbidden error:');
48
+ console.log(' 1. Make sure you have write access to the repository');
49
+ console.log(' 2. Check that issues are enabled on the repository');
50
+ console.log(' 3. Re-authenticate to get a fresh token with correct scopes');
51
+ console.log(' 4. Token needs "repo" scope for private repos or "public_repo" for public repos');
52
+ return {
53
+ hasToken: !!token,
54
+ hasUser: !!user,
55
+ hasOwner: !!owner,
56
+ hasRepo: !!repo,
57
+ isComplete: !!(token && user && owner && repo)
58
+ };
59
+ };
60
+ exports.diagnoseGitHubSetup = diagnoseGitHubSetup;
61
+ async function githubProxyRequest(method, endpoint, data) {
62
+ const token = (0, exports.getStoredToken)();
63
+ if (!token) {
64
+ throw new Error('Not authenticated with GitHub');
65
+ }
66
+ console.log(`🔵 GitHub API Request:`, { method, endpoint, hasData: !!data });
67
+ const resp = await fetch('/api/github-api', {
68
+ method: 'POST',
69
+ headers: { 'Content-Type': 'application/json' },
70
+ body: JSON.stringify({ token, method, endpoint, data }),
71
+ });
72
+ const payload = await resp.json();
73
+ console.log(`🔵 GitHub API Response:`, {
74
+ status: resp.status,
75
+ ok: resp.ok,
76
+ payload
77
+ });
78
+ if (!resp.ok) {
79
+ const message = (payload && (payload.message || payload.error)) || `GitHub API error (${resp.status})`;
80
+ if (resp.status === 403) {
81
+ console.error(`❌ 403 Forbidden - Possible causes:
82
+ 1. Token doesn't have 'repo' or 'public_repo' scope
83
+ 2. You don't have write access to the repository
84
+ 3. Issues are disabled on the repository
85
+ 4. Token has expired or been revoked
86
+
87
+ Current config:
88
+ - Owner: ${process.env.VITE_GITHUB_OWNER}
89
+ - Repo: ${process.env.VITE_GITHUB_REPO}
90
+ - Endpoint: ${endpoint}
91
+ `);
92
+ }
93
+ throw new Error(message);
94
+ }
95
+ return payload;
96
+ }
97
+ const encodePath = (path) => {
98
+ return path
99
+ .split('/')
100
+ .map((seg) => encodeURIComponent(seg))
101
+ .join('/');
102
+ };
103
+ const base64EncodeUtf8 = (input) => {
104
+ // btoa expects latin1; convert safely for utf-8
105
+ return btoa(unescape(encodeURIComponent(input)));
106
+ };
107
+ const base64DecodeUtf8 = (input) => {
108
+ return decodeURIComponent(escape(atob(input)));
109
+ };
110
+ const getLabelNames = (issue) => {
111
+ const labels = issue?.labels;
112
+ if (!Array.isArray(labels))
113
+ return [];
114
+ return labels
115
+ .map((l) => (typeof l === 'string' ? l : l?.name))
116
+ .filter((n) => typeof n === 'string');
117
+ };
118
+ const issueHasAnyVersion = (issue) => {
119
+ const labelNames = getLabelNames(issue);
120
+ if (labelNames.some((n) => n.startsWith('version:')))
121
+ return true;
122
+ const body = issue?.body || '';
123
+ return body.includes('Version:');
124
+ };
125
+ exports.githubAdapter = {
126
+ async createIssue(params) {
127
+ if (!(0, exports.isGitHubConfigured)())
128
+ return { success: false, error: 'Please sign in with GitHub' };
129
+ const owner = process.env.VITE_GITHUB_OWNER;
130
+ const repo = process.env.VITE_GITHUB_REPO;
131
+ try {
132
+ const metadata = [
133
+ `- Route: \`${params.route}\``,
134
+ params.version ? `- Version: \`${params.version}\`` : null,
135
+ `- Coordinates: \`(${params.xPercent.toFixed(1)}%, ${params.yPercent.toFixed(1)}%)\``,
136
+ ]
137
+ .filter(Boolean)
138
+ .join('\n');
139
+ const issueBody = {
140
+ title: params.title,
141
+ body: `${params.body}\n\n---\n**Metadata:**\n${metadata}`,
142
+ };
143
+ const data = await githubProxyRequest('POST', `/repos/${owner}/${repo}/issues`, issueBody);
144
+ // Add helpful labels (non-fatal if it fails)
145
+ try {
146
+ const labels = [
147
+ 'hale-comment',
148
+ `route:${params.route}`,
149
+ `coords:${Math.round(params.xPercent)},${Math.round(params.yPercent)}`,
150
+ ];
151
+ if (params.version)
152
+ labels.push(`version:${params.version}`);
153
+ await githubProxyRequest('POST', `/repos/${owner}/${repo}/issues/${data.number}/labels`, { labels });
154
+ }
155
+ catch {
156
+ // ignore label failures
157
+ }
158
+ return { success: true, data };
159
+ }
160
+ catch (e) {
161
+ return { success: false, error: e?.message || 'Failed to create issue' };
162
+ }
163
+ },
164
+ async createComment(issueNumber, body) {
165
+ if (!(0, exports.isGitHubConfigured)())
166
+ return { success: false, error: 'Please sign in with GitHub' };
167
+ const owner = process.env.VITE_GITHUB_OWNER;
168
+ const repo = process.env.VITE_GITHUB_REPO;
169
+ try {
170
+ const data = await githubProxyRequest('POST', `/repos/${owner}/${repo}/issues/${issueNumber}/comments`, { body });
171
+ return { success: true, data };
172
+ }
173
+ catch (e) {
174
+ return { success: false, error: e?.message || 'Failed to create comment' };
175
+ }
176
+ },
177
+ async fetchIssuesForRoute(route) {
178
+ return exports.githubAdapter.fetchIssuesForRouteAndVersion(route);
179
+ },
180
+ async fetchIssuesForRouteAndVersion(route, version) {
181
+ if (!(0, exports.isGitHubConfigured)())
182
+ return { success: false, error: 'Please sign in with GitHub' };
183
+ const owner = process.env.VITE_GITHUB_OWNER;
184
+ const repo = process.env.VITE_GITHUB_REPO;
185
+ try {
186
+ const data = await githubProxyRequest('GET', `/repos/${owner}/${repo}/issues?state=all&per_page=100`);
187
+ // Filter by metadata OR labels (route:${route}), and optionally by version
188
+ const filtered = (Array.isArray(data) ? data : [])
189
+ .filter((issue) => {
190
+ const body = issue?.body || '';
191
+ const labels = getLabelNames(issue);
192
+ const bodyMatch = body.includes(`Route: \`${route}\``);
193
+ const labelMatch = labels.includes(`route:${route}`);
194
+ return bodyMatch || labelMatch;
195
+ })
196
+ .filter((issue) => {
197
+ if (!version)
198
+ return true;
199
+ const labels = getLabelNames(issue);
200
+ const body = issue?.body || '';
201
+ const versionLabelMatch = labels.includes(`version:${version}`);
202
+ const bodyVersionMatch = body.includes(`Version: \`${version}\``);
203
+ // Back-compat: if an issue has no version metadata at all, treat it as default "1"
204
+ if (!issueHasAnyVersion(issue) && version === '1')
205
+ return true;
206
+ return versionLabelMatch || bodyVersionMatch;
207
+ });
208
+ return { success: true, data: filtered };
209
+ }
210
+ catch (e) {
211
+ return { success: false, error: e?.message || 'Failed to fetch issues' };
212
+ }
213
+ },
214
+ async fetchIssueComments(issueNumber) {
215
+ if (!(0, exports.isGitHubConfigured)())
216
+ return { success: false, error: 'Please sign in with GitHub' };
217
+ const owner = process.env.VITE_GITHUB_OWNER;
218
+ const repo = process.env.VITE_GITHUB_REPO;
219
+ try {
220
+ const data = await githubProxyRequest('GET', `/repos/${owner}/${repo}/issues/${issueNumber}/comments?per_page=100`);
221
+ return { success: true, data };
222
+ }
223
+ catch (e) {
224
+ return { success: false, error: e?.message || 'Failed to fetch issue comments' };
225
+ }
226
+ },
227
+ async updateComment(commentId, body) {
228
+ if (!(0, exports.isGitHubConfigured)())
229
+ return { success: false, error: 'Please sign in with GitHub' };
230
+ const owner = process.env.VITE_GITHUB_OWNER;
231
+ const repo = process.env.VITE_GITHUB_REPO;
232
+ try {
233
+ const data = await githubProxyRequest('PATCH', `/repos/${owner}/${repo}/issues/comments/${commentId}`, { body });
234
+ return { success: true, data };
235
+ }
236
+ catch (e) {
237
+ return { success: false, error: e?.message || 'Failed to update comment' };
238
+ }
239
+ },
240
+ async deleteComment(commentId) {
241
+ if (!(0, exports.isGitHubConfigured)())
242
+ return { success: false, error: 'Please sign in with GitHub' };
243
+ const owner = process.env.VITE_GITHUB_OWNER;
244
+ const repo = process.env.VITE_GITHUB_REPO;
245
+ try {
246
+ await githubProxyRequest('DELETE', `/repos/${owner}/${repo}/issues/comments/${commentId}`);
247
+ return { success: true, data: {} };
248
+ }
249
+ catch (e) {
250
+ return { success: false, error: e?.message || 'Failed to delete comment' };
251
+ }
252
+ },
253
+ async closeIssue(issueNumber) {
254
+ if (!(0, exports.isGitHubConfigured)())
255
+ return { success: false, error: 'Please sign in with GitHub' };
256
+ const owner = process.env.VITE_GITHUB_OWNER;
257
+ const repo = process.env.VITE_GITHUB_REPO;
258
+ try {
259
+ const data = await githubProxyRequest('PATCH', `/repos/${owner}/${repo}/issues/${issueNumber}`, { state: 'closed' });
260
+ return { success: true, data };
261
+ }
262
+ catch (e) {
263
+ return { success: false, error: e?.message || 'Failed to close issue' };
264
+ }
265
+ },
266
+ async reopenIssue(issueNumber) {
267
+ if (!(0, exports.isGitHubConfigured)())
268
+ return { success: false, error: 'Please sign in with GitHub' };
269
+ const owner = process.env.VITE_GITHUB_OWNER;
270
+ const repo = process.env.VITE_GITHUB_REPO;
271
+ try {
272
+ const data = await githubProxyRequest('PATCH', `/repos/${owner}/${repo}/issues/${issueNumber}`, { state: 'open' });
273
+ return { success: true, data };
274
+ }
275
+ catch (e) {
276
+ return { success: false, error: e?.message || 'Failed to reopen issue' };
277
+ }
278
+ },
279
+ async getRepoFile(path) {
280
+ if (!(0, exports.isGitHubConfigured)())
281
+ return { success: false, error: 'Please sign in with GitHub' };
282
+ const owner = process.env.VITE_GITHUB_OWNER;
283
+ const repo = process.env.VITE_GITHUB_REPO;
284
+ try {
285
+ const data = await githubProxyRequest('GET', `/repos/${owner}/${repo}/contents/${encodePath(path)}`);
286
+ const content = typeof data?.content === 'string' ? data.content.replace(/\n/g, '') : '';
287
+ const sha = data?.sha;
288
+ if (!content || !sha)
289
+ return { success: true, data: null };
290
+ const text = base64DecodeUtf8(content);
291
+ return { success: true, data: { text, sha } };
292
+ }
293
+ catch (e) {
294
+ // If file doesn't exist yet, treat as empty
295
+ if (String(e?.message || '').toLowerCase().includes('not found')) {
296
+ return { success: true, data: null };
297
+ }
298
+ return { success: false, error: e?.message || 'Failed to read repo file' };
299
+ }
300
+ },
301
+ async putRepoFile(params) {
302
+ if (!(0, exports.isGitHubConfigured)())
303
+ return { success: false, error: 'Please sign in with GitHub' };
304
+ const owner = process.env.VITE_GITHUB_OWNER;
305
+ const repo = process.env.VITE_GITHUB_REPO;
306
+ try {
307
+ const payload = {
308
+ message: params.message,
309
+ content: base64EncodeUtf8(params.text),
310
+ };
311
+ if (params.sha)
312
+ payload.sha = params.sha;
313
+ const data = await githubProxyRequest('PUT', `/repos/${owner}/${repo}/contents/${encodePath(params.path)}`, payload);
314
+ const newSha = data?.content?.sha;
315
+ return { success: true, data: { sha: newSha || params.sha || '' } };
316
+ }
317
+ catch (e) {
318
+ return { success: false, error: e?.message || 'Failed to write repo file' };
319
+ }
320
+ },
321
+ };
@@ -0,0 +1,25 @@
1
+ export interface Comment {
2
+ id: string;
3
+ author?: string;
4
+ text: string;
5
+ createdAt: string;
6
+ githubCommentId?: number;
7
+ parentCommentId?: string;
8
+ parentGitHubCommentId?: number;
9
+ }
10
+ export type SyncStatus = 'synced' | 'local' | 'pending' | 'syncing' | 'error';
11
+ export type ThreadStatus = 'open' | 'closed';
12
+ export interface Thread {
13
+ id: string;
14
+ xPercent: number;
15
+ yPercent: number;
16
+ route: string;
17
+ version?: string;
18
+ comments: Comment[];
19
+ issueNumber?: number;
20
+ issueUrl?: string;
21
+ provider?: 'github';
22
+ syncStatus?: SyncStatus;
23
+ syncError?: string;
24
+ status?: ThreadStatus;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export declare const getVersionFromPathOrQuery: (pathname: string, search: string) => string | undefined;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVersionFromPathOrQuery = void 0;
4
+ const getVersionFromPathOrQuery = (pathname, search) => {
5
+ try {
6
+ const params = new URLSearchParams(search || '');
7
+ const fromQuery = params.get('version') || params.get('v');
8
+ if (fromQuery && String(fromQuery).trim())
9
+ return String(fromQuery).trim();
10
+ // Common pattern: /v3/... or /version/3/...
11
+ const m1 = pathname.match(/^\/v(\d+)(?:\/|$)/i);
12
+ if (m1?.[1])
13
+ return m1[1];
14
+ const m2 = pathname.match(/\/version\/(\d+)(?:\/|$)/i);
15
+ if (m2?.[1])
16
+ return m2[1];
17
+ }
18
+ catch {
19
+ // ignore
20
+ }
21
+ return undefined;
22
+ };
23
+ exports.getVersionFromPathOrQuery = getVersionFromPathOrQuery;
package/package.json CHANGED
@@ -1,31 +1,39 @@
1
1
  {
2
2
  "name": "hale-commenting-system",
3
- "version": "2.0.2",
4
- "description": "Local-first commenting system for React applications with localStorage persistence",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/index.d.ts",
3
+ "version": "2.0.4",
4
+ "description": "Commenting system for PatternFly Seed projects with GitHub and Jira integration",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
8
7
  "bin": {
9
- "hale-commenting-system": "./cli/dist/index.js"
10
- },
11
- "exports": {
12
- ".": {
13
- "import": "./dist/index.mjs",
14
- "require": "./dist/index.js",
15
- "types": "./dist/index.d.ts"
16
- }
8
+ "hale-commenting": "./bin/hale-commenting.js"
17
9
  },
18
10
  "files": [
19
11
  "dist",
20
- "cli/dist"
12
+ "bin",
13
+ "templates",
14
+ "README.md"
21
15
  ],
22
16
  "scripts": {
23
- "build": "npm run build:lib && npm run build:cli",
24
- "build:lib": "tsup",
25
- "build:cli": "cd cli && npm run build",
26
- "dev": "tsup --watch",
17
+ "build": "tsc && npm run build:cli && npm run build:postinstall",
18
+ "build:cli": "tsc --project tsconfig.cli.json",
19
+ "build:postinstall": "tsc --project tsconfig.postinstall.json",
27
20
  "type-check": "tsc --noEmit",
28
- "prepare": "npm run build"
21
+ "prepublishOnly": "npm run build"
22
+ },
23
+ "postinstall": "node bin/postinstall.js",
24
+ "keywords": [
25
+ "commenting",
26
+ "feedback",
27
+ "patternfly",
28
+ "github",
29
+ "jira",
30
+ "uxd"
31
+ ],
32
+ "author": "Justin X. Hale",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/JustinXHale/pfseed-commenting-system.git"
29
37
  },
30
38
  "peerDependencies": {
31
39
  "@patternfly/react-core": "^6.0.0",
@@ -35,26 +43,19 @@
35
43
  "react-router-dom": "^6.0.0 || ^7.0.0"
36
44
  },
37
45
  "dependencies": {
38
- "commander": "^12.0.0",
39
- "inquirer": "^9.2.15",
40
- "chalk": "^5.3.0",
41
- "ora": "^8.0.1"
46
+ "chalk": "^4.1.2",
47
+ "inquirer": "^9.3.8",
48
+ "node-fetch": "^2.7.0"
42
49
  },
43
50
  "devDependencies": {
44
- "@types/react": "^18.0.0",
45
- "@types/react-dom": "^18.0.0",
46
- "tsup": "^8.0.2",
47
- "typescript": "^5.4.5"
51
+ "@types/inquirer": "^9.0.9",
52
+ "@types/node": "^20.19.27",
53
+ "@types/node-fetch": "^2.6.13",
54
+ "@types/react": "^18.2.45",
55
+ "@types/react-dom": "^18.2.18",
56
+ "typescript": "^5.9.3"
48
57
  },
49
- "keywords": [
50
- "react",
51
- "comments",
52
- "feedback",
53
- "localstorage",
54
- "patternfly",
55
- "cli",
56
- "local-first"
57
- ],
58
- "author": "Justin Hale",
59
- "license": "MIT"
58
+ "engines": {
59
+ "node": ">=16.0.0"
60
+ }
60
61
  }