Skip to content

feat: export JSON schema from @powersync/service-schema#496

Merged
stevensJourney merged 11 commits intomainfrom
export-merged-schema
Feb 16, 2026
Merged

feat: export JSON schema from @powersync/service-schema#496
stevensJourney merged 11 commits intomainfrom
export-merged-schema

Conversation

@stevensJourney
Copy link
Copy Markdown
Collaborator

@stevensJourney stevensJourney commented Feb 9, 2026

We currently include a JSON schema for the PowerSync service configuration. This schema can be used for type checking and autocomplete when editing PowerSync self hosted YAML configuration files.

This version of the configuration merges all possible combinations of different module Replication connection and bucket storage types.

We don't currently export any other version of a merged configuration typing. This PR updates the existing package to additionally explicitly export the JSON schema.

I've also added the MSSSQL connection type to the exported merged schema.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 9, 2026

🦋 Changeset detected

Latest commit: 0d5ad71

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

This PR includes changesets to release 12 packages
Name Type
@powersync/service-schema Patch
@powersync/service-core Patch
@powersync/service-image Patch
@powersync/service-core-tests Patch
@powersync/service-module-core Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mssql Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
test-client Patch

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

@rkistner
Copy link
Copy Markdown
Contributor

This changes the schema package to depend on all the individual source database modules.

Does this have a significant impact on users of this package, for example for the editor in the dashboard or CLI? (I didn't confirm where exactly this is used currently).

In theory it only uses /types which are primarily type definitions (including ts-codec definitions, not just TypeScript types), but some of those also contain NodeJS imports and other potentially-large dependencies, so I think we'd need to audit and/or test those.

@stevensJourney
Copy link
Copy Markdown
Collaborator Author

Does this have a significant impact on users of this package, for example for the editor in the dashboard or CLI? (I didn't confirm where exactly this is used currently).

In theory it only uses /types which are primarily type definitions (including ts-codec definitions, not just TypeScript types), but some of those also contain NodeJS imports and other potentially-large dependencies, so I think we'd need to audit and/or test those.

The Dashboard currently directly imports from those modules' packages - which should already have a similar affect as including those deps to the schema package would have.

I do agree it would be nicer to have the schema package be lighter and not depend on all the modules' dependencies.

I tried investigating the possibility to bundle the modules' packages - where one might ignore certain database driver packages. This was not trivial.

Another alternative could be to move the modules' types to the @powersync/service-types package. This would be a larger change which would also affect the current monorepo structure a bit.

After some investigation, I found I don't actually need the ts-codec or TypeScript types for the merged config. I only require the JSON schema for the CLI's validation. I've updated this PR to now explicitly export the JSON schema.

@stevensJourney stevensJourney changed the title feat: export MergedServiceConfig from @powersync/service-schema feat: export JSON schema from @powersync/service-schema Feb 16, 2026
Comment thread packages/schema/src/index.ts Outdated
Comment thread modules/module-mongodb/src/types/types.ts
@stevensJourney stevensJourney marked this pull request as ready for review February 16, 2026 14:13
@stevensJourney stevensJourney merged commit e1b4afe into main Feb 16, 2026
26 checks passed
@stevensJourney stevensJourney deleted the export-merged-schema branch February 16, 2026 14:42
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