fix: more permissive registration destructuring - #187
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughWorkspace-wide dependency and package version bumps; extractArgumentNames refactor with tests; CLI codegen now emits encryption-aware worker factories and injects them into registrations templates; Stripe apiVersion and pnpm/CI/workspace configurations updated. ChangesWorkspace Version Update and Code Refactor
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
cli/src/core/worker_type.rs (1)
132-164: 💤 Low valueRemove redundant type cast on
tenantId.The cast
(context?.tenantId as string)is unnecessary. SincetenantIdis already typed asstring | undefinedin the context, and the?? ''operator safely defaults to an empty string, the explicit cast adds no value and can be removed. The code is safe as-is, but removing the cast improves clarity.(context?.tenantId ?? '')🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cli/src/core/worker_type.rs` around lines 132 - 164, Remove the unnecessary type cast on tenantId inside the factory string literals: update BULLMQ_WORKER_PRODUCER_FACTORY, KAFKA_WORKER_PRODUCER_FACTORY, and REDIS_WORKER_PRODUCER_FACTORY to replace occurrences of "(context?.tenantId as string) ?? ''" with "(context?.tenantId ?? '')", i.e., edit the embedded JS factory strings so they no longer include the redundant "as string" cast while preserving the nullish coalescing fallback to ''.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@blueprint/iam-better-auth/package.json`:
- Line 58: The package now depends on "uuid": "^14.0.0" which requires Node.js
20+, so update the package manifest to declare the Node.js engine or revert the
uuid upgrade; specifically, in blueprint/iam-better-auth package.json add an
"engines" field (e.g. "node": ">=20") to make the requirement explicit for
consumers or CI, or alternatively pin "uuid" back to a Node 18-compatible
version (e.g. ^13.0.0) if you must keep Node 18 support—update the package.json
near the "uuid": "^14.0.0" entry and ensure any CI/tooling respects the engine
constraint.
In `@framework/core/package.json`:
- Around line 97-108: The package.json mixes OpenTelemetry release lines (e.g.,
"@opentelemetry/sdk-logs", "@opentelemetry/sdk-node",
"@opentelemetry/exporter-trace-otlp-http",
"@opentelemetry/instrumentation-http", "@opentelemetry/resources",
"@opentelemetry/sdk-metrics", "@opentelemetry/sdk-trace-node"); update these
entries so they all use the same release line (choose either the stable 2.7.x
line or the experimental 0.217.x line) and change each version string
accordingly to be consistent across all OpenTelemetry packages in the file.
---
Nitpick comments:
In `@cli/src/core/worker_type.rs`:
- Around line 132-164: Remove the unnecessary type cast on tenantId inside the
factory string literals: update BULLMQ_WORKER_PRODUCER_FACTORY,
KAFKA_WORKER_PRODUCER_FACTORY, and REDIS_WORKER_PRODUCER_FACTORY to replace
occurrences of "(context?.tenantId as string) ?? ''" with "(context?.tenantId ??
'')", i.e., edit the embedded JS factory strings so they no longer include the
redundant "as string" cast while preserving the nullish coalescing fallback to
''.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c24cb2b6-2b1c-41f2-8605-286ae5331cff
⛔ Files ignored due to path filters (2)
blueprint/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlframework/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (63)
blueprint/billing-base/package.jsonblueprint/billing-stripe/package.jsonblueprint/billing-stripe/scripts/seed-plans-from-stripe.tsblueprint/billing-stripe/scripts/sync-stripe-plans.tsblueprint/core/package.jsonblueprint/iam-base/package.jsonblueprint/iam-better-auth/package.jsonblueprint/implementations/billing/base/CHANGELOG.mdblueprint/implementations/billing/base/package.jsonblueprint/implementations/billing/stripe/CHANGELOG.mdblueprint/implementations/billing/stripe/package.jsonblueprint/implementations/iam/base/CHANGELOG.mdblueprint/implementations/iam/base/package.jsonblueprint/implementations/worker/bullmq/CHANGELOG.mdblueprint/implementations/worker/bullmq/package.jsonblueprint/implementations/worker/database/CHANGELOG.mdblueprint/implementations/worker/database/package.jsonblueprint/implementations/worker/kafka/CHANGELOG.mdblueprint/implementations/worker/kafka/package.jsonblueprint/implementations/worker/redis/CHANGELOG.mdblueprint/implementations/worker/redis/package.jsonblueprint/interfaces/billing/CHANGELOG.mdblueprint/interfaces/billing/package.jsonblueprint/interfaces/iam/CHANGELOG.mdblueprint/interfaces/iam/package.jsonblueprint/interfaces/worker/CHANGELOG.mdblueprint/interfaces/worker/package.jsonblueprint/monitoring/package.jsonblueprint/package.jsonblueprint/sample-worker/package.jsoncli/src/core/ast/transformations/transform_registrations_ts.rscli/src/core/ast/transformations/transform_service_to_worker.rscli/src/core/package_json/package_json_constants.rscli/src/core/worker_type.rscli/src/templates/project/service/registrations.tsframework/bunrun/CHANGELOG.mdframework/bunrun/package.jsonframework/common/CHANGELOG.mdframework/common/__test__/extractArgumentNames.test.tsframework/common/package.jsonframework/common/src/extractArgumentNames.tsframework/core/CHANGELOG.mdframework/core/package.jsonframework/e2e-tests/package.jsonframework/express/CHANGELOG.mdframework/express/package.jsonframework/hyper-express/CHANGELOG.mdframework/hyper-express/package.jsonframework/infrastructure/S3/CHANGELOG.mdframework/infrastructure/S3/package.jsonframework/infrastructure/redis/CHANGELOG.mdframework/infrastructure/redis/package.jsonframework/internal/CHANGELOG.mdframework/internal/package.jsonframework/package.jsonframework/testing/CHANGELOG.mdframework/testing/package.jsonframework/universal-sdk/CHANGELOG.mdframework/universal-sdk/package.jsonframework/validator/CHANGELOG.mdframework/validator/package.jsonframework/ws/CHANGELOG.mdframework/ws/package.json
Summary by CodeRabbit