Skip to content

feat: add package system (PackageLoader) and first-party packages#1995

Merged
bpamiri merged 16 commits intodevelopfrom
peter/plugins-sentry-hotwire-basecoat
Mar 26, 2026
Merged

feat: add package system (PackageLoader) and first-party packages#1995
bpamiri merged 16 commits intodevelopfrom
peter/plugins-sentry-hotwire-basecoat

Conversation

@bpamiri
Copy link
Copy Markdown
Collaborator

@bpamiri bpamiri commented Mar 26, 2026

Summary

  • New package system: PackageLoader.cfc discovers vendor/*/package.json on startup with per-package error isolation, mixin collection, ServiceProvider/middleware support
  • Moved plugins to packages: sentry, hotwire, basecoat now live in packages/ with package.json manifests (replacing plugin.json). Activate by copying to vendor/
  • Deprecation path: plugins/ still works via existing Plugins.cfc but logs a deprecation warning
  • CI: per-package test step copies each package to vendor/, runs its specs, cleans up
  • Build: packages/ included in release artifact

Architecture

packages/           # First-party optional (NOT auto-loaded)
  sentry/           # wheels-sentry
  hotwire/          # wheels-hotwire
  basecoat/         # wheels-basecoat
vendor/             # Runtime: framework core + activated packages
  wheels/           # Framework core (excluded from package discovery)
  (sentry/, etc.)   # Activated packages appear here
plugins/            # DEPRECATED: legacy plugins still work with warning

Test plan

  • Lucee 7 + H2: 2268 pass, 0 fail, 0 error
  • Lucee 6 + H2: 2268 pass, 0 fail, 0 error
  • Package activation: copy basecoat to vendor/, app starts, core tests unaffected
  • Error isolation: broken package in vendor/ logged and skipped, app continues
  • CI matrix runs per-package tests across all engines

🤖 Generated with Claude Code

bpamiri and others added 12 commits March 26, 2026 08:28
20-task plan covering polish for SentryForWheels, finishing Hotwire's
missing helper, and building Basecoat Phases 2-5 (dialog, field,
table, tabs, dropdown, pagination, sidebar, breadcrumb).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds the Wheels 3.x plugin.json manifest to suppress deprecation warnings
and an index.cfm status/reference page for the plugin admin UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add plugin.json manifest to suppress Wheels 3.x deprecation warning.
Fix mixin attribute: remove invalid dispatch and microsofttablehelper scopes,
leaving only controller and view.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ile handle leak, timestamp

- Change $sentryGetUser() from public to private ($ prefix = internal)
- Wrap initSentry() body in named exclusive lock to prevent double-init races
- Fix HTTP status check: Left(statuscode,3) != "200" instead of find("200",...)
- Fix file handle leak: replace fileOpen/fileReadLine/fileClose with FileRead+ListToArray in try/catch
- Add Z suffix to ISO 8601 timestamp in getTimeVars()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove 'culprit' key from exception event payload (deprecated in SDK v7)
- Change exception type from 'exType & " Error"' to just 'exType' to avoid
  double-labeling (e.g., "Application Error Error")

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Renders JSON path configuration for Hotwire Native apps. Accepts optional
settings struct (tabs, etc.) and rules array. Falls back to sensible defaults:
all pages use default context with pull-to-refresh; /new$ and /edit$ paths
open as modals without pull-to-refresh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mp, user context, breadcrumbs

Covers:
- DSN parsing via public API (valid modern, valid legacy, invalid throws)
- ISO 8601 Z-suffix timestamp format
- sentrySetUser stores and overwrites request.sentryUserOverride
- addBreadcrumb appends in order and includes optional data struct
- getEnvironment/getRelease accessors return init values

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers all public helpers: hotwireIncludes, turboFrame/turboFrameEnd,
all 8 turbo stream actions (verifying template presence/absence on remove
and refresh), and all 4 Stimulus attribute helpers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…E.md

- Add plugin.json with correct metadata (mixins: controller,view, wheelsVersion: 3.0)
- Fix Basecoat.cfc mixin attribute: remove stale dispatch and microsofttablehelper scopes
- Replace Hotwire-content ARCHITECTURE.md with Basecoat-specific architecture doc
- Add Phase 2 dialog family (uiDialog, uiDialogFooter, uiDialogEnd) with native <dialog>, ARIA attributes, optional trigger button
- Add Phase 3 uiField with full type support: text/email/password/number/tel/url/textarea/select/checkbox/switch; error state; description; auto-generated IDs
- Add Phase 4: uiTable family, uiTabs family, uiDropdown (CSS-only details/summary), uiPagination with ellipsis/window logic
- Add Phase 5: uiBreadcrumb family, uiSidebar family

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- BasecoatSimpleSpec: Phase 1+2 — button class construction (compound variants, icon-only, anchor, turboConfirm, disabled), badge variants, alert (title/description/destructive), card family, progress, spinner, skeleton, tooltip, separator
- BasecoatComplexSpec: Phase 2-5 — dialog ARIA attributes (labelledby/describedby, ID matching, trigger/no-trigger, close button), field layout (label-above vs flex-row for checkbox/switch, error state, description, auto-IDs), table wrappers, tabs data-attributes, dropdown details/summary, pagination (disabled prev/next, window, current page), breadcrumb (aria-label, linked/current), sidebar (active state, icons, section heading)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…wheels-basecoat

Rename SentryForWheels/ folder to sentry/, rename SentryForWheels.cfc
to Sentry.cfc, update all internal component paths, plugin.json names,
box.json slugs, and documentation references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added docs dependencies Pull requests that update a dependency file labels Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Wheels Test Matrix

Engine MySQL PostgreSQL SQL Server H2 CockroachDB Oracle SQLite
lucee6 -- -- -- -- -- -- --
lucee7 -- -- -- -- -- -- --
adobe2023 --
adobe2025 --
boxlang -- -- -- -- -- -- --

Results for commit 31d05e9.

@github-actions
Copy link
Copy Markdown
Contributor

Wheels Test Results

    12 files   -     20   1 120 suites   - 2 240   5m 7s ⏱️ - 10m 8s
22 160 tests  - 44 344  22 068 ✅  - 43 939  92 💤  - 198  0 ❌  - 84 
22 800 runs   - 45 624  22 708 ✅  - 45 210  92 💤  - 198  0 ❌  - 93 

Results for commit 8630129. ± Comparison against base commit 5b30582.

This pull request removes 44344 tests.
boxlang/cockroachdb :: $formatSSEEvent internal method ‑ does not include empty optional fields
boxlang/cockroachdb :: $formatSSEEvent internal method ‑ formats data-only event
boxlang/cockroachdb :: $formatSSEEvent internal method ‑ formats event with all fields in correct order
boxlang/cockroachdb :: $formatSSEEvent internal method ‑ formats event with type
boxlang/cockroachdb :: $formatSSEEvent internal method ‑ handles empty data string
boxlang/cockroachdb :: $generatedKey ‑ returns lastId
boxlang/cockroachdb :: $get() tenant config override ‑ returns application value when tenant has no override for that key
boxlang/cockroachdb :: $get() tenant config override ‑ returns tenant config value when set
boxlang/cockroachdb :: $getType ‑ delegates integer to PostgreSQL parent
boxlang/cockroachdb :: $getType ‑ delegates text to PostgreSQL parent
…

@bpamiri bpamiri marked this pull request as draft March 26, 2026 20:40
bpamiri and others added 2 commits March 26, 2026 13:55
Replace the legacy plugins/ directory with a new packages/ → vendor/ activation
model. PackageLoader discovers vendor/*/package.json on startup with per-package
error isolation, collects mixins into the existing injection pipeline, and supports
ServiceProvider and middleware registration.

- Add vendor/wheels/PackageLoader.cfc for package discovery and loading
- Move sentry, hotwire, basecoat from plugins/ to packages/
- Replace plugin.json with package.json (adds provides.mixins/services/middleware)
- Wire $loadPackages() into onapplicationstart.cfc and EventMethods.cfc
- Add deprecation warning when plugins/ directory has loaded plugins
- Tested: Lucee 6 + Lucee 7 × H2 = 2268 pass, 0 fail, 0 error

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add "Run per-package tests" step to CI that copies each package to
  vendor/, restarts the engine, runs the package's test specs, then
  cleans up. Uses h2 for Lucee, sqlite for others. Non-blocking warnings.
- Update prepare-base.sh to include packages/ in release artifact.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added enhancement javascript Pull requests that update javascript code labels Mar 26, 2026
@bpamiri bpamiri changed the title feat: add first-party plugins — wheels-sentry, wheels-hotwire, wheels-basecoat feat: add package system (PackageLoader) and first-party packages Mar 26, 2026
bpamiri and others added 2 commits March 26, 2026 14:01
SQLite works across all engines (Lucee, Adobe, BoxLang) unlike H2 which
is Lucee-only. Standardize on sqlite as the embedded DB for package tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add PackageLoaderSpec.cfc with 10 BDD specs covering discovery, error
  isolation, manifest parsing, and mixin collection
- Add test fixtures in tests/_assets/packages/ (goodpkg, brokenpkg,
  nomanifest, nomixin)
- Add componentPrefix param to PackageLoader.init() for test flexibility
- Create packages/sentry/CLAUDE.md
- Update packages/hotwire/CLAUDE.md and packages/basecoat/CLAUDE.md to
  reflect package architecture (s/Plugin/Package/)
- Add Package System section to main CLAUDE.md with activation docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bpamiri bpamiri marked this pull request as ready for review March 26, 2026 21:07
@bpamiri bpamiri merged commit 7db5a71 into develop Mar 26, 2026
6 of 7 checks passed
@bpamiri bpamiri deleted the peter/plugins-sentry-hotwire-basecoat branch March 26, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docs enhancement javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant