Repository navigation
Align generated plugins with the published 0.2.1 contract - #9
Conversation
Pin the shared libraries at 3.3.4, keep dashed public names, and own settings routes inside the plugin. CI now runs the packed-CLI deliverables matrix.
Reviewer's GuideThis release aligns the generator and its published npm artifact with the 0.2.1 host contract by pinning compatible dependencies, preserving dashed plugin identities, moving settings into plugin-owned routes, adding secured tenant-scoped platform examples, and validating the packed CLI through a CI deliverables matrix spanning all supported backends. Sequence diagram for secured platform sample accesssequenceDiagram
actor User
participant UI as PluginUI
participant Gateway
participant API as PluginAPI
participant Resolver
participant Models as TenantBoundModels
User->>UI: Open sample page
UI->>Gateway: GraphQL samples(limit, offset)
Gateway->>API: Forward user and tenant headers
API->>Resolver: Resolve __camel__Samples
Resolver->>Resolver: checkPermission(SAMPLE_READ)
Resolver->>Models: list({limit, offset})
Models-->>Resolver: Tenant-scoped samples
Resolver-->>UI: Samples or authorization error
Flow diagram for packed CLI deliverables validationflowchart TD
PR[Pull request or release] --> Workflow[Reusable deliverables workflow]
Workflow --> Matrix[Backend and package-manager matrix]
Matrix --> Pack[Build and pack CLI]
Pack --> External[Install in fresh external directory]
External --> Checks[Run codegen check lint and build]
Checks --> Federation[Verify federation exposes and no host-singleton fallback]
Federation --> Result[Deliverables pass]
Result --> Release[Release job]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| runs-on: ubuntu-latest | ||
| timeout-minutes: 25 | ||
| strategy: | ||
| fail-fast: false | ||
| max-parallel: 3 | ||
| matrix: | ||
| # Every backend builds React too. Additional package managers are | ||
| # exercised on the default platform stack rather than a 6x4 matrix. | ||
| case: [platform-pnpm, platform-npm, platform-yarn, express-pnpm, fastify-pnpm, hono-pnpm, nestjs-pnpm, elysia-bun] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: pnpm | ||
| - uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: "1.x" | ||
| - run: corepack enable yarn && corepack prepare yarn@4.18.1 --activate | ||
| - run: pnpm install --frozen-lockfile | ||
| - name: Test packed CLI in a fresh external directory | ||
| run: pnpm test:e2e | ||
| env: | ||
| E2E_CASE: ${{ matrix.case }} |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. The generated platform permission declares sample reads as tenant-wide (all), so users granted that action can read every sample record in their tenant. If that scope is too broad, reverting this generator change will not revoke access or undo disclosures from projects already generated and deployed.
Summary
@erxes/create-plugin@0.2.1.@erxes/ui,@erxes/ui-modules, and@erxes/api-sharedat3.3.4.Verification
pnpm check,pnpm lint, andpnpm test: 54 tests passed..github/workflows/deliverables.ymlruns. It was not repeated locally in this push.0.2.1is already public. This pull request does not publish again.Summary by Sourcery
Publish the 0.2.1-compatible plugin generator with corrected host integration, dependency compatibility, security defaults, and deliverable validation.
New Features:
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests:
Chores: