een-api-toolkit 0.0.8 → 0.0.13

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/CHANGELOG.md CHANGED
@@ -2,222 +2,333 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.0.8] - 2025-12-27
5
+ ## [0.0.13] - 2025-12-29
6
6
 
7
- ### 📋 Release Summary
7
+ ### Release Summary
8
8
 
9
- #### PR #9: Release v0.0.8: Dependency upgrades and release notes enhancement
9
+ #### PR #15: feat: Launch OAuth proxy in CI for e2e tests
10
10
  ## Summary
11
+ - Add proxy setup steps to test-release.yml workflow to run OAuth e2e tests in CI
12
+ - Clone, install, and start OAuth proxy on port 8787 during CI
13
+ - Create .dev.vars with required secrets for local proxy operation
14
+ - Fix Slack release notes link to point to GitHub Release page instead of .md download
15
+ - Add CLIENT_SECRET to secrets sync script and documentation
11
16
 
12
- This release upgrades development dependencies to resolve security vulnerabilities and enhances the release workflow with auto-generated release notes from PR descriptions.
13
-
14
- ### Dependency Upgrades
15
- | Package | From | To |
16
- |---------|------|-----|
17
- | @types/node | ^20.10.0 | ^22.0.0 |
18
- | @vitejs/plugin-vue | ^5.0.0 | ^6.0.0 |
19
- | typescript | ^5.3.0 | ~5.8.0 |
20
- | vite | ^5.0.0 | ^7.3.0 |
21
- | vite-plugin-dts | ^3.7.0 | ^4.5.4 |
22
- | vitest | ^1.2.0 | ^4.0.16 |
23
- | vue-tsc | ^1.8.0 | ^3.2.1 |
24
-
25
- ### Build Warning Fixes
26
- - Reorder package.json exports (`types` before `import`/`require`)
27
- - Pin TypeScript to ~5.8.0 for API Extractor compatibility
28
- - Suppress dynamic/static import warning (not applicable to single-file library)
29
- - Make lazy-loader concurrency-safe by caching promise
30
-
31
- ### Release Notes Enhancement
32
- - Auto-generate release summary from merged PR descriptions
33
- - Include `RELEASE-NOTES-vX.X.X.md` as GitHub release asset
34
- - Add direct link to release notes in Slack success notification
17
+ ## Changes
18
+ - `.github/workflows/test-release.yml`: Add steps to clone proxy, install deps, create secrets file, and start proxy
19
+ - `.github/workflows/npm-publish.yml`: Fix Slack release notes link to avoid .md download
20
+ - `scripts/sync-secrets.sh`: Add CLIENT_SECRET to sync list
21
+ - `CLAUDE.md`: Document CLIENT_SECRET requirement
35
22
 
36
23
  ## Test plan
37
- - [x] Unit tests pass (7/7)
38
- - [x] Lint passes (0 errors)
39
- - [x] TypeScript type checking passes
40
- - [x] Build succeeds with no warnings
41
- - [x] Package verification passes
24
+ - [ ] Verify test-release workflow runs and proxy starts successfully
25
+ - [ ] Verify e2e OAuth tests execute against the local proxy
26
+ - [ ] Verify Slack notification links to GitHub Release page (not .md download)
42
27
 
43
28
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
44
29
 
45
- #### PR #7: Release v0.0.6
30
+ #### PR #16: fix: Strip leading whitespace from .dev.vars heredoc
46
31
  ## Summary
47
- Release v0.0.6 with workflow reliability improvements.
32
+ - Fix heredoc indentation issue in test-release.yml that caused proxy env vars to not be parsed
48
33
 
49
- ## Changes
34
+ ## Problem
35
+ The `.dev.vars` heredoc content was indented for YAML readability, but those leading spaces became part of the file content:
36
+ ```
37
+ CLIENT_ID=xxx
38
+ ALLOWED_ORIGINS=http://127.0.0.1:3333
39
+ ```
50
40
 
51
- ### Version
52
- - Bump: 0.0.5 → 0.0.6
41
+ This caused wrangler to not recognize the environment variables, so `ALLOWED_ORIGINS` was empty and the proxy rejected OAuth callback requests with "Invalid redirect_uri: domain not allowed".
53
42
 
54
- ### Workflow Improvements
55
- - Add version check to skip publish if version already exists on npm
56
- - Skip GitHub Release and Slack notification if already published
57
- - Add repository link to success Slack notification
58
- - Enhance failure Slack notification with:
59
- - Repository link
60
- - Direct link to failed workflow run
43
+ ## Fix
44
+ Added `sed -i 's/^[[:space:]]*//'` to strip leading whitespace after creating the file.
61
45
 
62
- ## Why
63
- PR #6 merge triggered the publish workflow, but version 0.0.5 was already published, causing failure. The new version check prevents this.
46
+ ## Test plan
47
+ - [ ] Verify test-release workflow passes
48
+ - [ ] Verify OAuth e2e tests complete successfully
64
49
 
65
50
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
66
51
 
67
- #### PR #6: feat: Enhanced release notifications and GitHub Releases
52
+ #### PR #17: fix: Use printf with quoted values for .dev.vars
68
53
  ## Summary
69
- - Add GitHub Release creation alongside npm publish
70
- - Enhance Slack notifications with more details and links
54
+ Fix special character handling in `.dev.vars` secrets file creation.
71
55
 
72
- ## Changes
56
+ ## Problem
57
+ The `CLIENT_SECRET` contains special characters (like `#`) that were being interpreted as comment markers when written to `.dev.vars` without proper quoting, causing the value to be truncated.
73
58
 
74
- ### GitHub Release (`npm-publish.yml`)
75
- - Creates GitHub Release with version tag (e.g., `v0.0.6`)
76
- - Attaches npm tarball to the release
77
- - Generates release notes with:
78
- - Installation command
79
- - Package details (npm link, version, size, release time in CST)
80
- - Links to npm, documentation, and changelog
59
+ ## Solution
60
+ Use `printf` with double-quoted values, matching the pattern from `een-oauth-proxy/test-demo1-pr.yml`:
81
61
 
82
- ### Enhanced Slack Notification
83
- - Clickable link to npm package
84
- - Clickable link to GitHub Release
85
- - Package size
86
- - Release timestamp in America/Chicago timezone
62
+ ```bash
63
+ printf 'CLIENT_ID="%s"\n' "$CLIENT_ID" > .dev.vars
64
+ printf 'CLIENT_SECRET="%s"\n' "$CLIENT_SECRET" >> .dev.vars
65
+ ```
87
66
 
88
- ### Documentation
89
- - Updated CLAUDE.md to document GitHub Release functionality
67
+ This properly escapes special characters in secret values.
90
68
 
91
69
  ## Test plan
92
- - [ ] Merge PR and verify GitHub Release is created
93
- - [ ] Verify Slack notification includes all new fields
94
- - [ ] Verify release notes are properly formatted
70
+ - [ ] Verify test-release workflow passes
71
+ - [ ] Verify OAuth e2e tests complete successfully
95
72
 
96
73
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
97
74
 
98
- #### PR #5: ci: Add npm publish workflow
75
+ #### PR #18: docs: Restructure documentation and add CI validation
99
76
  ## Summary
100
- - Add automated npm publish workflow triggered when PRs merge to production
101
- - Include manual trigger option with dry run mode for testing
102
- - Slack notifications for publish success/failure
77
+
78
+ - Restructure README.md into a concise overview with quick start guide
79
+ - Create separate User Guide (docs/USER-GUIDE.md) for app developers
80
+ - Create separate Developer Guide (docs/DEVELOPER-GUIDE.md) for contributors
81
+ - Regenerate TypeDoc API reference for version 0.0.11
82
+ - Fix broken EENCloud GitHub link in CLAUDE.md
83
+ - Add documentation validation step to test-release workflow
103
84
 
104
85
  ## Changes
105
- - New `.github/workflows/npm-publish.yml` workflow
106
86
 
107
- ## Test plan
108
- - [ ] Verify workflow syntax is valid
109
- - [ ] After merge, manually trigger with dry_run=true to test
110
- - [ ] Manually trigger without dry_run to publish v0.0.5 to npm
87
+ ### Documentation Restructure
88
+ - **README.md**: Simplified with key features first, quick start guide, architecture diagram
89
+ - **docs/USER-GUIDE.md**: New comprehensive guide covering installation, proxy setup, auth flow, API usage, troubleshooting
90
+ - **docs/DEVELOPER-GUIDE.md**: New guide for contributors covering architecture, testing, CI/CD, publishing
91
+ - **docs/README.md**: Updated as documentation index with audience descriptions
92
+
93
+ ### CI/CD
94
+ - Added "Verify documentation is current" step to test-release.yml
95
+ - Fails build if docs are stale, ensuring release docs always match code
111
96
 
97
+ ### Fixes
98
+ - Updated broken link to EENCloud/api-v3-documentation (404) → VMS-Developer-Portal (200)
99
+ - Regenerated all TypeDoc files with version 0.0.11
100
+
101
+ ## Test Results
102
+ - Lint: Passed (1 warning)
103
+ - Unit tests: 7/7 passed
104
+ - Build: Success
105
+
106
+ ## Version
107
+ `0.0.11`
108
+
109
+ ---
112
110
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
113
111
 
114
- #### PR #4: Release v0.0.5: Documentation system and example app
112
+ #### PR #19: Release v0.0.11: Documentation restructure and OAuth requirements
115
113
  ## Summary
116
114
 
117
- - Add comprehensive documentation system with TypeDoc and AI-CONTEXT.md
118
- - Create complete Vue 3 example application
119
- - Add disclaimer to README
115
+ This release focuses on comprehensive documentation improvements:
120
116
 
121
- ## Changes
117
+ - **Documentation restructure**: Split README into user-focused and developer-focused sections
118
+ - `docs/USER-GUIDE.md` - For application developers using the toolkit
119
+ - `docs/DEVELOPER-GUIDE.md` - For contributors to the toolkit
120
+ - **OAuth redirect URI requirements**: Added critical documentation based on user testing feedback
121
+ - EEN IDP requires exact string match: `http://127.0.0.1:3333` (not localhost, no /callback path)
122
+ - Added router pattern examples for handling OAuth on root path
123
+ - Added link to EEN Developer Portal for redirect URI configuration
124
+ - **Architecture diagram fixes**: Corrected to show auth calls vs API calls use different paths
125
+ - **CI documentation validation**: Added step to test-release workflow to fail if docs are stale
126
+ - **AI-CONTEXT.md improvements**: Critical Requirements section now auto-generated
122
127
 
123
- ### Documentation System
124
- - **TypeDoc integration** - Auto-generates API docs from JSDoc comments
125
- - **AI-CONTEXT.md** - Single-file comprehensive reference for AI assistants (~700 lines)
126
- - **Enhanced JSDoc** - All exports documented with examples, @param, @returns, @category
127
- - **npm scripts** - `docs`, `docs:api`, `docs:ai-context`
128
+ ### Key Changes
128
129
 
129
- ### Example Application
130
- - Complete Vue 3 app in `examples/vue-basic/`
131
- - OAuth flow (login, callback, logout)
132
- - User list with pagination using composables
133
- - Auth guards for protected routes
134
- - Configured for EEN IDP requirement (http://127.0.0.1:3333)
130
+ - Restructured documentation for better discoverability
131
+ - Added comprehensive OAuth troubleshooting guidance
132
+ - Fixed architecture diagrams to accurately show auth flow
133
+ - Updated PR-and-check skill to support develop→production PRs
134
+ - Added Purpose section to README explaining toolkit goals
135
135
 
136
- ### README Updates
137
- - Added disclaimer (no warranty, not associated with EEN)
138
- - Added Documentation section with links
136
+ ### Version
139
137
 
140
- ## New Exports
141
- - `getRedirectUri()` - Config function for OAuth redirect URI
142
- - `TokenResponse` - Type for OAuth token response
143
- - `UseCurrentUserOptions`, `UseUsersOptions`, `UseUserOptions` - Composable option types
138
+ **Package version:** 0.0.11
144
139
 
145
- ## Test plan
146
- - [x] `npm run build` passes
147
- - [x] `npm run lint` passes
148
- - [x] `npm run docs` generates successfully
149
- - [ ] Code review passes
140
+ ### Test Results
141
+
142
+ - Linting passed (1 warning - max-len in test file)
143
+ - Unit tests: 7/7 passed
144
+ - Build: successful
150
145
 
151
146
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
152
147
 
153
- #### PR #3: Release v0.0.2: E2E tests and security documentation
148
+ #### PR #20: docs: Add Pinia prerequisite requirements to documentation
154
149
  ## Summary
155
150
 
156
- This PR adds comprehensive E2E testing infrastructure and security documentation to the toolkit.
151
+ This PR adds comprehensive documentation about Pinia prerequisites to help users avoid the common "getActivePinia() was called but there was no active Pinia" error.
157
152
 
158
- ### Changes
153
+ ## Changes
159
154
 
160
- **E2E Testing with Playwright**
161
- - Added `auth-helper.ts` for OAuth login with token caching
162
- - Added `auth.spec.ts` to validate auth helper functionality
163
- - Added `users.spec.ts` with 5 tests for Users API endpoints
164
- - Configured Playwright for Chromium-only testing with single worker
165
- - Added `test:e2e` and `test:e2e:ui` npm scripts
155
+ - **AI-CONTEXT.md**: Added "Prerequisites (IMPORTANT)" section with Pinia installation requirements and error message
156
+ - **USER-GUIDE.md**: Enhanced toolkit initialization section and added troubleshooting entry for the Pinia error
157
+ - **DEVELOPER-GUIDE.md**: Added Pinia as a key design decision explaining the dependency requirement
158
+ - **generate-ai-context.ts**: Updated generation script to include Pinia prerequisites
166
159
 
167
- **Documentation**
168
- - Added security model section to CLAUDE.md (refresh token isolation)
169
- - Added security/robustness priorities statement
160
+ ## New Commits
170
161
 
171
- **Bug Fixes**
172
- - Excluded e2e folder from Vitest to prevent test conflicts
162
+ - `9308498` fix: Update AI-CONTEXT generator to include Pinia prerequisites
163
+ - `f62490b` docs: Add Pinia prerequisite requirements to documentation
173
164
 
174
- ### Test Results
175
- - Unit tests: 7 passed
176
- - E2E tests: 6 passed (auth helper + 5 Users API tests)
177
- - Lint: 1 warning (intentional console in debug.ts)
178
- - Build: Success
165
+ ## Test Results
179
166
 
180
- ### Version
181
- `0.0.2`
167
+ - ✅ Lint: Passed (1 expected warning)
168
+ - ✅ Unit tests: 7/7 passed
169
+ - ✅ Build: Successful
170
+
171
+ ## Version
172
+
173
+ `0.0.11`
182
174
 
183
175
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
184
176
 
185
- #### PR #2: Initial project setup and planning documentation
177
+ #### PR #21: docs: Add In-Place Login pattern for single-page OAuth callbacks
186
178
  ## Summary
187
179
 
188
- - Add comprehensive project planning documentation (CLAUDE.md, README.md)
189
- - Set up development tooling (scripts, skills, .env configuration)
190
- - Configure local proxy URL for development
191
- - Add GitHub secrets sync script
180
+ This PR adds documentation for the "In-Place Login" pattern - handling OAuth callbacks on the same page that displays user data without navigation.
192
181
 
193
182
  ## Changes
194
183
 
195
- ### Documentation
196
- - **CLAUDE.md**: Technical guidance for Claude Code including architecture, patterns, API specs, workflows
197
- - **README.md**: Developer usage documentation with examples, setup instructions, configuration
184
+ - **AI-CONTEXT.md**: Added "In-Place Login (Single Page Callback)" to Common Patterns section
185
+ - **USER-GUIDE.md**: Added same pattern to Authentication Flow section with expanded explanation
186
+ - **generate-ai-context.ts**: Updated script to include the pattern in future regenerations
187
+
188
+ ## Problem Addressed
189
+
190
+ Developers implementing single-page OAuth flows were encountering issues where `useCurrentUser()` didn't update after successful login. The documentation now explains:
191
+ - Why `refresh()` must be called after `handleAuthCallback()` when staying on the same page
192
+ - That composables don't auto-refresh when auth state changes
193
+ - Complete working example with login button and callback handling
194
+
195
+ ## New Commits
198
196
 
199
- ### Configuration
200
- - **.env.example**: Environment variable template
201
- - **scripts/sync-secrets.sh**: Sync .env to GitHub repository secrets
197
+ - `3b7b6a0` docs: Add In-Place Login pattern for single-page OAuth callbacks
202
198
 
203
- ### Skills
204
- - **.claude/skills/PR-and-check/**: PR workflow skill for feature branches
199
+ ## Test Results
205
200
 
206
- ## Test Plan
207
- - [ ] Review documentation for accuracy
208
- - [ ] Verify sync-secrets.sh works with `--dry-run`
201
+ - Lint: Passed (1 expected warning)
202
+ - Unit tests: 7/7 passed
203
+ - Build: Successful
209
204
 
210
- 🤖 Generated with [Claude Code](https://claude.ai/code)
205
+ ## Version
211
206
 
207
+ `0.0.11`
208
+
209
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
210
+
211
+ #### PR #22: fix: Correct proxy endpoints and API references in README
212
+ ## Summary
212
213
 
213
- ### 📝 Detailed Changes
214
+ - Fix incorrect proxy endpoints documentation (`/oauth/authorize`, `/oauth/token` → `/proxy/getAccessToken`)
215
+ - Update Key Features to reflect actual implemented APIs (Users only, not Cameras/Bridges)
216
+ - Fix code examples to use existing functions (`getCurrentUser`, `getUsers`, `getUser`)
217
+ - Update architecture diagram to show implemented APIs
218
+
219
+ ## Commits
220
+
221
+ - `ff85054` fix: Correct proxy endpoints and API references in README
222
+
223
+ ## Test Results
224
+
225
+ - ✅ Lint: passed (1 warning - expected console in debug.ts)
226
+ - ✅ Unit tests: 7 passed
227
+ - ✅ Build: successful
228
+
229
+ ## Version
230
+
231
+ `0.0.11`
232
+
233
+ ---
234
+
235
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
236
+
237
+ #### PR #23: feat: Include AI-CONTEXT.md in npm package and trigger releases on changes
238
+ ## Summary
239
+
240
+ This PR adds `docs/AI-CONTEXT.md` to the npm package distribution and ensures that updates to this file trigger new releases.
241
+
242
+ ### Changes
243
+
244
+ - **package.json**: Added `docs/AI-CONTEXT.md` to the `files` array so it's included in the npm package
245
+ - **.husky/pre-commit**: Modified to trigger version bump when `docs/AI-CONTEXT.md` changes
246
+ - **CLAUDE.md**: Updated documentation to reflect the new behavior
247
+ - **docs/DEVELOPER-GUIDE.md**: Updated documentation with explanation of why AI-CONTEXT.md triggers releases
248
+
249
+ ### Rationale
250
+
251
+ The README positions AI-assisted development as a key value proposition of this toolkit. Including `AI-CONTEXT.md` in the npm package makes it immediately accessible to consumers using AI assistants without requiring them to clone the repo or navigate to GitHub.
252
+
253
+ ### Commits
254
+
255
+ - `3505d9d` feat: Include AI-CONTEXT.md in npm package and trigger releases on changes
256
+
257
+ ### Test Results
258
+
259
+ - ✅ Linting passed (1 warning - expected console statement in debug.ts)
260
+ - ✅ Unit tests passed (7/7)
261
+ - ✅ Build successful
262
+
263
+ ### Version
264
+
265
+ `0.0.11`
266
+
267
+ #### PR #24: chore: Release v0.0.13
268
+ ## Summary
269
+
270
+ Version bump to 0.0.13 for new release including:
271
+ - AI-CONTEXT.md included in npm package
272
+ - README.md changes now trigger version bumps
273
+ - Updated Husky pre-commit hook configuration
274
+ - **Fix:** Removed AI-CONTEXT.md from version bump triggers to prevent circular versioning
275
+
276
+ ### Version
214
277
 
215
- #### 📦 Other Changes
216
- - Merge pull request #9 from klaushofrichter/develop
278
+ `0.0.13`
279
+
280
+ ### Previous Release
281
+
282
+ v0.0.11 was published via PR #23
283
+
284
+ ### Version Fix
285
+
286
+ This release fixes a circular dependency issue where updating AI-CONTEXT.md
287
+ (a generated file) would trigger another version bump. AI-CONTEXT.md now
288
+ correctly reflects the version without causing additional bumps.
289
+
290
+
291
+ ### Detailed Changes
292
+
293
+ #### Features
294
+ - feat: Add README.md to version bump triggers
295
+ - feat: Include AI-CONTEXT.md in npm package and trigger releases on changes
296
+ - feat: Launch OAuth proxy in CI for e2e tests
297
+
298
+ #### Bug Fixes
299
+ - fix: Remove AI-CONTEXT.md from version bump triggers
300
+ - fix: Correct proxy endpoints and API references in README
301
+ - fix: Address code review feedback for In-Place Login pattern
302
+ - fix: Add redirectUri and debug to initEenToolkit examples
303
+ - fix: Address code review feedback
304
+ - fix: Update AI-CONTEXT generator to include Pinia prerequisites
305
+ - fix: Update router example to handle OAuth on root path
306
+ - fix: Address PR #17 review feedback
307
+ - fix: Use printf with quoted values for .dev.vars
308
+ - fix: Address PR #16 review feedback
309
+ - fix: Strip leading whitespace from .dev.vars heredoc
310
+ - fix: Address PR #15 review feedback
311
+
312
+ #### Other Changes
313
+ - docs: Regenerate API documentation for v0.0.13
314
+ - docs: Update AI-CONTEXT.md version to 0.0.12
315
+ - chore: Bump version to 0.0.12 for release
316
+ - docs: Fix glob patterns to show deep matching (src/**/*)
317
+ - docs: Add getCurrentUser example to README
318
+ - docs: Fix API references in USER-GUIDE and DEVELOPER-GUIDE
319
+ - docs: Add In-Place Login pattern for single-page OAuth callbacks
320
+ - docs: Add Pinia prerequisite requirements to documentation
321
+ - docs: Add OAuth requirements and update doc generation script
322
+ - docs: Add OAuth requirements, proxy info, and EEN portal links
323
+ - docs: Add purpose section and update PR-and-check skill
324
+ - docs: Fix architecture diagrams and error handling example
325
+ - ci: Add documentation validation to test-release workflow
326
+ - docs: Regenerate docs for v0.0.11 and fix broken link
327
+ - docs: Restructure documentation for users and developers
217
328
 
218
329
  ### Links
219
330
  - [npm package](https://www.npmjs.com/package/een-api-toolkit)
220
- - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/commits/v0.0.8)
331
+ - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/compare/v0.0.11...v0.0.13)
221
332
 
222
333
  ---
223
- *Released: 2025-12-27 10:23:46 CST*
334
+ *Released: 2025-12-29 14:15:09 CST*