Skip to content

feat(sdk): add manual configuration for publishEvents#653

Merged
toiroakr merged 1 commit intomainfrom
feat/publish-record-event
Mar 4, 2026
Merged

feat(sdk): add manual configuration for publishEvents#653
toiroakr merged 1 commit intomainfrom
feat/publish-record-event

Conversation

@murayama-r
Copy link
Contributor

@murayama-r murayama-r commented Mar 3, 2026

Summary

  • Add manual configuration support for publishEvents option on TailorDB types and resolvers
  • If not specified, publishEvents is automatically set to true when an executor uses the type/resolver with relevant triggers
  • If explicitly set to false while an executor uses the type/resolver, an error is thrown during apply
  • Rename user-facing API from publishRecordEvents/publishExecutionEvents to unified publishEvents
  • Internal API field names remain unchanged (publishRecordEvents for types, publishExecutionEvents for resolvers)

Test plan

  • Unit tests for snapshot-manifest validation
  • Build succeeds
  • Typecheck passes (no errors related to changes)

🤖 Generated with Claude Code


Open with Devin

@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2026

🦋 Changeset detected

Latest commit: 6b5f1db

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@tailor-platform/sdk Minor
@tailor-platform/create-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 3, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@tailor-platform/create-sdk@653

commit: addeb95

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Contributor

@toiroakr toiroakr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to include the configuration methods and use cases in the documentation as well.

@toiroakr toiroakr assigned toiroakr and murayama-r and unassigned toiroakr Mar 3, 2026
@github-actions

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Contributor

@toiroakr toiroakr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

This comment has been minimized.

@murayama-r murayama-r force-pushed the feat/publish-record-event branch from 6e757cc to 0e4f98f Compare March 3, 2026 14:34
@github-actions

This comment has been minimized.

@murayama-r murayama-r force-pushed the feat/publish-record-event branch from 0e4f98f to 0cd1d7c Compare March 3, 2026 14:48
@github-actions

This comment has been minimized.

…es and resolvers

- Add publishEvents option to TypeFeatures interface for TailorDB types
- Add publishEvents option to ResolverSchema for resolvers
- Auto-detect when executor uses type/resolver and enable publishing
- Respect explicit false setting; throw error if executor conflicts
- Update snapshot manifest generation to read publishEvents
- Add documentation for the feature

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@murayama-r murayama-r force-pushed the feat/publish-record-event branch from 0cd1d7c to 6b5f1db Compare March 3, 2026 15:20
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Code Metrics Report (packages/sdk)

main (669693d) #653 (addeb95) +/-
Coverage 50.2% 50.3% +0.0%
Code to Test Ratio 1:0.4 1:0.4 +0.0
Details
  |                    | main (669693d) | #653 (addeb95) |  +/-  |
  |--------------------|----------------|----------------|-------|
+ | Coverage           |          50.2% |          50.3% | +0.0% |
  |   Files            |            258 |            258 |     0 |
  |   Lines            |           8672 |           8698 |   +26 |
+ |   Covered          |           4362 |           4378 |   +16 |
+ | Code to Test Ratio |          1:0.4 |          1:0.4 |  +0.0 |
  |   Code             |          50113 |          50253 |  +140 |
+ |   Test             |          20169 |          20256 |   +87 |

Code coverage of files in pull request scope (56.5% → 56.6%)

Files Coverage +/- Status
packages/sdk/src/cli/commands/apply/resolver.ts 58.7% -2.9% modified
packages/sdk/src/cli/commands/apply/tailordb/index.ts 35.9% +0.5% modified
packages/sdk/src/cli/commands/tailordb/migrate/snapshot-manifest.ts 80.1% +1.3% modified
packages/sdk/src/cli/commands/tailordb/migrate/snapshot.ts 70.5% -0.1% modified
packages/sdk/src/configure/services/resolver/resolver.ts 100.0% 0.0% modified
packages/sdk/src/configure/services/tailordb/types.ts 0.0% 0.0% modified
packages/sdk/src/parser/service/resolver/schema.ts 100.0% 0.0% modified
packages/sdk/src/parser/service/tailordb/schema.ts 86.2% 0.0% modified
packages/sdk/src/parser/service/tailordb/types.ts 100.0% 0.0% modified

SDK Configure Bundle Size

main (669693d) #653 (addeb95) +/-
configure-index-size 9.34KB 9.63KB 0.29KB
dependency-chunks-size 32.64KB 32.64KB 0KB
total-bundle-size 41.98KB 42.28KB 0.3KB

Runtime Performance

main (669693d) #653 (addeb95) +/-
Generate Median 2,522ms 2,652ms 130ms
Generate Max 2,645ms 2,718ms 73ms
Apply Build Median 2,640ms 2,689ms 49ms
Apply Build Max 2,702ms 2,712ms 10ms

Type Performance (instantiations)

main (669693d) #653 (addeb95) +/-
tailordb-basic 157,161 157,265 104
tailordb-optional 5,240 5,240 0
tailordb-relation 5,147 5,150 3
tailordb-validate 4,004 4,004 0
tailordb-hooks 7,157 7,157 0
tailordb-object 12,944 12,944 0
tailordb-enum 3,872 3,872 0
resolver-basic 13,799 13,836 37
resolver-nested 30,546 30,583 37
resolver-array 22,590 22,627 37
executor-schedule 12,583 12,583 0
executor-webhook 9,138 9,138 0
executor-record 13,770 13,773 3
executor-resolver 16,476 16,513 37
executor-operation-function 9,116 9,116 0
executor-operation-gql 9,119 9,119 0
executor-operation-webhook 9,132 9,132 0
executor-operation-workflow 10,413 10,413 0

Reported by octocov

@toiroakr toiroakr merged commit a44021b into main Mar 4, 2026
25 checks passed
@toiroakr toiroakr deleted the feat/publish-record-event branch March 4, 2026 00:11
@tailor-pr-trigger tailor-pr-trigger bot mentioned this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants